[ros-users] Obstacles Detection with laser data

Bhaskara Marthi bhaskara at willowgarage.com
Tue Jan 18 17:33:13 UTC 2011


Hi Nicolas, it's hard to diagnose this without more surrounding context and
an explanation of what exactly 'not working well' means.  But one
possibility might be that pts_laser and state2.pose are not in the same
coordinate frame.  Have you used tf to transform the point cloud into the
global frame?
- Bhaskara

2011/1/18 Nicolás Alvarez Picco <nicolasapicco at hotmail.com>

>  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
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>


-- 
Bhaskara Marthi
Research Scientist
Willow Garage Inc.
650-475-2856
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20110118/f5952712/attachment-0003.html>


More information about the ros-users mailing list