How to get the distance in meter from PointCloud Data?
Hello, I am pretty new with ROS and Robotino. I am using ROS-Indigo, Ubuntu 14.4 and Robotino by Festo. I am subscribing the ros topic /distance_sensor :
ros::Subscriber sub = n.subscribe("/distance_sensors",1, distacne_sensor_Callback);
void distacne_sensor_Callback(const sensor_msgs::PointCloudConstPtr& msg)
{
for (i=0;i<msg->points.size();i++) {
ROS_INFO("X : %f", msg->points[i].x);
ROS_INFO("Y : %f", msg->points[i].y);
ROS_INFO("Z : %f", msg->points[i].z);
}
I am getting the x,y,z values for each of the 9 distance sensors. How can I get the distance in meter using these data? I need to use these for obstacle detection. Can anyone give me any idea on this issue? Thank is advance.