The reason the rangers do not detect robots when put on a position device is that they are *on top of the position device* and their beams pass over the other robots. To solve this, put a small negative z pose for the ranger, as in the pioneer and other example world files.

On Mon, May 26, 2014 at 1:11 PM, Christof <> wrote:

i am trying to implement a robot population which can detect other robots via sonar/ranger devices. Unfortunately, my robot position model does not work as intended.
This is my position model:

define robot position

    # actual size
    size [0.1 0.1 0.2]
    origin [0 0 0 45]

    bitmap "bitmaps/circle.png"

    # positional things
    drive "diff"
    obstacle_return 0
    ranger_return 1
    laser_return 1

    # sensors attached to robot

and my robots look like this:

    name "r0"
    pose [ 6 6 0 151]
    color "blue"
    ranger_return 1

Without the model() line the rangers do not work correctly. They only detect walls, not the other robots besides the ranger_return 1.
With the model() line the rangers work correctly. But somehow, the robots have not the intended sizes, colors, and shapes.
I attached screenshots to show my problem and the world file. I use stage.hh to setup my world and control the robots.
Does anyone know how to fix this problem? If there is more knowledge needed to fix this problem please ask me.


The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
Playerstage-developers mailing list