How to calculate the length of a path
Hello to everyone here, I want to get the length of navigation path. The generated path consists of a sequence of coordinates points (x,y) which i can obtain by subscribing to a topic named as "/move_base/GlobalPlanner/plan". I know that if I calculate the distance of every two points and add them up, I will be able to extract the total path's length.
My subscriber looks like:
sub = rospy.Subscriber("/move_base/GlobalPlanner/plan", Path, callback)
What should the structure of my callback be in order to obtain all the poses of path ? Does anyone have python experience of doing that ?