Ask Your Question

How convert path point distance to real world distance?

asked 2013-02-01 15:25:01 -0500

redheli gravatar image

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 flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-02-02 04:21:24 -0500

damjan gravatar image

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.

edit flag offensive delete link more



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!

redheli gravatar image redheli  ( 2013-02-02 16:02:28 -0500 )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?

damjan gravatar image damjan  ( 2013-02-11 22:24:21 -0500 )edit

answered 2013-02-02 02:12:00 -0500

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..

edit flag offensive delete link more



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

redheli gravatar image redheli  ( 2013-02-02 15:59:43 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-02-01 15:25:01 -0500

Seen: 1,002 times

Last updated: Feb 02 '13