Hello everybody,

I am trying to set up a simulation for a robot with a sonar ranger and an IR ranger on player-stage, I use Player 2.1.0 and stage 2.1.1.

I found many examples about how to mount the sonar ranger but i am not able to get working the IR sensors.
I saw in the documentation that the ranger stage interface can be use for sonar and ir ranger but i can't find the way. I have the following code:

########################
define us_ranger ranger
(
  scount 6

  # define the pose of each transducer
  spose[0] [ -0.28  0.23     54 ]
  spose[1] [  0.28  0.23     25 ]
  spose[2] [  0.28  0.00      0 ]
  spose[3] [  0.28 -0.23    -25 ]
  spose[4] [ -0.28 -0.23    -54 ]
  spose[5] [ -0.28  0.00    180 ]

  # define the field of view of each transducer [range_min range_max view_angle]
  sview [0 4.1 40]

  # define the size of each transducer [xsize ysize] in meters
  ssize [0.01 0.05]
)

#########################
define ir_ranger ranger
(
  scount 2

  # define the pose of each transducer
  #        [  ypos  xpos heading]
  irpose[0] [ -0.28  0.23     90 ]
  irpose[1] [ -0.28 -0.23    -90 ]

  # define the field of view of each transducer [range_min range_max view_angle]
  sview [0 2.5 10]

  # define the size of each transducer [xsize ysize] in meters
  ssize [0.005 0.005]
)

I get this output:
warn: worldfile ./simple.world:23 : property [ircount] is defined but not used (worldfile.cc WarnUnused)
warn: worldfile ./simple.world:27 : property [irpose[0]] is defined but not used (worldfile.cc WarnUnused)
warn: worldfile ./simple.world:28 : property [irpose[1]] is defined but not used (worldfile.cc WarnUnused)
warn: worldfile ./simple.world:31 : property [irview] is defined but not used (worldfile.cc WarnUnused)
warn: worldfile ./simple.world:34 : property [irsize] is defined but not used (worldfile.cc WarnUnused)

I also try to define it like a sonar interface, but then I do not know how to make understand player/stage that this is an ir ranger.

Can anybody help me with this?

Thanks,
Kamil.