Ah ok, I understand.  For efficiency, rather than computing the distance to each point in the cloud each time, you can project the cloud into a grid representing the robot configuration space and inflate each obstacle.  This is already implemented in the costmap_2d ROS package.<br>
- Bhaskara<br><br><div class="gmail_quote">2011/1/18 Nicolás Alvarez Picco <span dir="ltr"><<a href="mailto:nicolasapicco@hotmail.com">nicolasapicco@hotmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">




<div>
Hi Everybody!!<br><br>I want to detect objects, but just their position to avoid them with the laser data. So I am using these lines:<br><br>   for(int it=0; it<size_cloud; it++){<br>           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<br>
      <br>        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<br>            <br>
            return false;<br>        }<br>  } <br><br>where pts_laser is a pcl_pointcloud and the state2 give me the future position of the robot.<br>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.<br>
This thing is not working well. So do you have a better solution or an idea??<br><br>Thanks<br><br>Nicolas<br>                                      </div>
<br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Bhaskara Marthi<br>Research Scientist<br>Willow Garage Inc.<br>650-475-2856<br>