Re: [ros-users] Obstacles Detection with laser data

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
+ (text/html)
Slet denne besked
Besvar denne besked
Skribent: User discussions
Dato:  
Til: User discussions
Emne: Re: [ros-users] Obstacles Detection with laser data
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 <>

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



--
Bhaskara Marthi
Research Scientist
Willow Garage Inc.
650-475-2856