ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

# How convert path point distance to real world distance?

From navigation package ,I can get the a path to the goal. but the points in the path are very close, I mean it is like: (45.0001 70.0002) , (45.0002 70.0003) ,(45.0003 70.0004) ...

and the distance between those points is very small value.

my question is : how convert this small value distance to real world distance with unit meter?

Thank you.

edit retag close merge delete

Sort by ยป oldest newest most voted

Which message are listening for from the navigation package? If you are listening for nav_msgs/Path, the coordinates should be in meters. You should be able to get the total distance to the goal by adding up the small distances between the individual points.

more

1

Damjan, you are right. I subscribe the /path[nav_msgs/Path], and I calculate the total distance of the path points , the value is real meter distance. Thank you so much!

( 2013-02-02 16:02:28 -0600 )edit

Glad it helped! Could you please mark the answer as correct (by clicking on the checkmark to the left), so it shows up as answered in searches?

( 2013-02-11 22:24:21 -0600 )edit

In general the coordinates are defined in a particular unit, so if u calculate distance between these points it should be in meters or whatever the unit is..

more

1

Thank you shade. I realize ROS define the x,y,z coordinate in meter.

( 2013-02-02 15:59:43 -0600 )edit