question about the laser

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

question about the laser

hi every body
i'm new in player stage
i've make a simple exemple with laser
this my code
  LaserProxy   ls(&robot,0);    

 SimulationProxy simProxy(&robot,0);
 p2dProxy.SetMotorEnable(1); p2dProxy.RequestGeom();ls.RequestGeom();ls.RequestConfigure();

while (true)
 t=ls.GetCount() ;

for (i=0;i<t;i++)
{  robot.Read();d=ls.GetRange(i);
 if( d !=10) printf("obstacle");
the problem that d is always equal to zero!
this is the laser configuration
define robot_laser laser
        range_max 10.0
        fov 360
        samples 360
        bitmap "circle.png"
        size [0.9 0.9 0.1]
        color "black"
Thank you.
Reply | Threaded
Open this post in threaded view

Re: question about the laser

Hii light86,

Did you got the solution to this problem? I m also facing the same problem in stage 4.1.1,
If you have sorted this out then let me know?

Thanks in advance.