i want to attach the 2D laser scanner to my robot and catch data(like the objects the laser ray touched) while planning, but i don't know where to start. Is there an example for this? or can you tell me how i should do it? Thanks.
Check out the BaseLaser2D sensor. You can have its 'scantime' set to
some time X in the XML definition. This means that it will gather new
data every time SimulationStep(X) is called. By locking the
environment and calling the sensor's SimulationStep inside your
planner and then GetSensorData, you can get the range measurements for
your new scene. Finally, the laser range finders have a
"collidingbodies" command that you can call