Ask Your Question
0

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;
tf::poseMsgToEigen(m,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
2

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

Comments

thank you! That solved my problem!

mutu gravatar imagemutu ( 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

2 followers

Stats

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

Seen: 566 times

Last updated: Nov 30 '16