Ask Your Question

Convert geometry_ msgs/Pose to Point

asked 2016-11-30 05:46:30 -0500

mutu gravatar image

Hey all!,

i got a Posestd::vector<geometry_msgs::Pose> waypoints and now i would like to transform it to geometry_msgs::Point. I tried to convert it to Eigen and afterwards in Point. My first step would be something like:

std::vector<geometry_msgs::Pose> m;
m = waypoints;
Eigen::Affine3d e;

and i get an error: no matching function for call to poseMsgToEigen. Do you have any suggestions ?

Greetings mutu

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-11-30 06:41:59 -0500

rbbg gravatar image

Hi Mutu,

A geometry_msgs::Pose actually contains a geometry_msgs::Point as you can read in the documentation.

to get the pose just type:

geometry_msgs::Point pt = waypoints[i].position;

for the index i that you want. Do note that you lose the orientation information that is also contained in the pose.

edit flag offensive delete link more


thank you! That solved my problem!

mutu gravatar image mutu  ( 2016-12-01 08:15:19 -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: 2016-11-30 05:46:30 -0500

Seen: 1,129 times

Last updated: Nov 30 '16