hi pincy, thanks for your quick response
I understand what you say, and the code looks right but, for example, when the kilobots are placed in the arena, it seems that the relevant position is the led. you can see this in Figs.1 and 2 (grid distribution with the same orientations) and Figs. 3 and 4 (grid distribution with random orientations) what seems to be aligned are the led positions. Figure 5 shows that the rays are led to led and it might give problems with the estimation of distances
Code for figures 1, 2, and 5
Code: Select all
<?xml version="1.0" ?>
<argos-configuration>
<!-- ************************* -->
<!-- * General configuration * -->
<!-- ************************* -->
<framework>
<system threads="0" />
<experiment length="0"
ticks_per_second="31"
random_seed="124" />
</framework>
<!-- *************** -->
<!-- * Controllers * -->
<!-- *************** -->
<controllers>
<kilobot_controller id="kbc">
<actuators>
<differential_steering implementation="default" />
<kilobot_led implementation="default" />
<kilobot_communication implementation="default" />
</actuators>
<sensors>
<kilobot_communication implementation="default" medium="kilocomm" show_rays="true" />
</sensors>
<params behavior="build/examples/behaviors/disperse" />
</kilobot_controller>
</controllers>
<!-- *********************** -->
<!-- * Arena configuration * -->
<!-- *********************** -->
<arena size="2, 2, 1" center="0,0,0.5">
<distribute>
<position method="grid" center="0,0,0" distances="0.1,0.1,0" layout="4,3,1" />
<orientation method="constant" values="0,0,0"/>
<entity quantity="12" max_trials="100">
<kilobot id="kb">
<controller config="kbc" />>
</kilobot>
</entity>
</distribute>
</arena>
<!-- ******************* -->
<!-- * Physics engines * -->
<!-- ******************* -->
<physics_engines>
<dynamics2d id="dyn2d" />
</physics_engines>
<!-- ********* -->
<!-- * Media * -->
<!-- ********* -->
<media>
<kilobot_communication id="kilocomm" />
</media>
<!-- ****************** -->
<!-- * Visualization * -->
<!-- ****************** -->
<visualization>
<qt-opengl>
<camera>
<placement idx="0" position="-0.660983,0,0.6875" look_at="0.0531593,0,-0.0125011" lens_focal_length="20" />
</camera>
</qt-opengl>
</visualization>
</argos-configuration>
Code for figure 3
Code: Select all
<?xml version="1.0" ?>
<argos-configuration>
<!-- ************************* -->
<!-- * General configuration * -->
<!-- ************************* -->
<framework>
<system threads="0" />
<experiment length="0"
ticks_per_second="31"
random_seed="124" />
</framework>
<!-- *************** -->
<!-- * Controllers * -->
<!-- *************** -->
<controllers>
<kilobot_controller id="kbc">
<actuators>
<differential_steering implementation="default" />
<kilobot_led implementation="default" />
<kilobot_communication implementation="default" />
</actuators>
<sensors>
<kilobot_communication implementation="default" medium="kilocomm" show_rays="true" />
</sensors>
<params behavior="build/examples/behaviors/disperse" />
</kilobot_controller>
</controllers>
<!-- *********************** -->
<!-- * Arena configuration * -->
<!-- *********************** -->
<arena size="2, 2, 1" center="0,0,0.5">
<distribute>
<position method="grid" center="0,0,0" distances="0.1,0.1,0" layout="4,3,1" />
<orientation method="gaussian" mean="0,0,0" std_dev="360,0,0"/>
<entity quantity="12" max_trials="100">
<kilobot id="kb">
<controller config="kbc" />>
</kilobot>
</entity>
</distribute>
</arena>
<!-- ******************* -->
<!-- * Physics engines * -->
<!-- ******************* -->
<physics_engines>
<dynamics2d id="dyn2d" />
</physics_engines>
<!-- ********* -->
<!-- * Media * -->
<!-- ********* -->
<media>
<kilobot_communication id="kilocomm" />
</media>
<!-- ****************** -->
<!-- * Visualization * -->
<!-- ****************** -->
<visualization>
<qt-opengl>
<camera>
<placement idx="0" position="-0.660983,0,0.6875" look_at="0.0531593,0,-0.0125011" lens_focal_length="20" />
</camera>
</qt-opengl>
</visualization>
</argos-configuration>