I would like to know what double MoveBase::distance(const geometry_msgs::PoseStamped& p1, const geometry_msgs::PoseStamped& p2)
means , which is a function in move_base.cpp. Does it mean the distance from a present point to a goal point?
According to the code, that method calculates the Euclidian distance between p1
and p2
. So not necessarily a goal.
In addition, I would also like to know the meaning of geometry_msgs::PoseStamped
. Is it a self position?
p1
and p2
could be any point.
geometry_msgs/PoseStamped is a message in the geometry_msgs
pkg, and those can be used to represent arbitrary poses in a Cartesian coord system, relative to some origin.
Originally posted by gvdhoorn with karma: 86574 on 2017-12-04
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by rostaro on 2017-12-04:
Thank you for answering my question.
Thanks for your clear explanation, I understood that the function is for calculating the Euclidian distance between p1 and p2 ,which are arbitrary points.
Please excuse any mistakes I have made in this letter.
Thank you so much for your lucid instructions.
Comment by gvdhoorn on 2017-12-04:
No need to apologise for anything. We're all hear to ask questions and get answers.
Comment by rostaro on 2017-12-04:
I greatly appreciate your kindness.