[ros-users] Obstacles Detection with laser data

Nicolás Alvarez Picco nicolasapicco at hotmail.com
Tue Jan 18 16:55:45 UTC 2011


Hi Everybody!!

I want to detect objects, but just their position to avoid them with the laser data. So I am using these lines:

   for(int it=0; it<size_cloud; it++){
           dist_obstacles=sqrt(pow(pts_laser->points[it].x-state2.pose.x,2)+pow(pts_laser->points[it].y-state2.pose.y,2)); //distancia entre 2 muestras consecutivas
      
        if(dist_obstacles <= robot_r)  {// quiero decir si el centro de mi robot esta a mas de la distancia del r significa q esta en un estado a seguro!!! y 4 metros es el mx alcance de mi laser
            
            return false;
        }
  } 

where pts_laser is a pcl_pointcloud and the state2 give me the future position of the robot.
So it is a checker, if there is a point which is closer to the robot than the radius of the robot, so that state is unsafe.
This thing is not working well. So do you have a better solution or an idea??

Thanks

Nicolas
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20110118/118da7d8/attachment-0002.html>


More information about the ros-users mailing list