# What is the meaning of MoveBase::distance ?

I am sorry for my poor English.

I am a beginner at ROS and ROS navigation stack. 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?

In addition, I would also like to know the meaning of geometry_msgs::PoseStamped. Is it a self position?

I would appreciate it if you could answer my question.

Thank you.

edit retag close merge delete

Sort by ยป oldest newest most voted

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.

more

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.

( 2017-12-04 04:26:52 -0500 )edit

No need to apologise for anything. We're all hear to ask questions and get answers.

( 2017-12-04 04:27:38 -0500 )edit
1

( 2017-12-04 04:34:45 -0500 )edit