Ask Your Question
1

Point Cloud point to map coordinates

asked 2012-05-22 02:00:17 -0500

ZeroCool gravatar image

Can someone please explain how can I transform a point (from a point cloud) to coordinate space of the map (which is built using gmapping)?

I've read the TF tutorials (http://ros.org/wiki/tf, http://ros.org/wiki/tf/Tutorials) but I still don't understand them well.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2012-05-22 03:50:36 -0500

updated 2012-05-22 03:51:42 -0500

The methods to transform points (and various other types) are members of the TransformListener class (C++, Python). transformPoint is the method you're looking for.

edit flag offensive delete link more

Comments

Should I use base_link as frame id to make a correct transform?

ZeroCool gravatar image ZeroCool  ( 2012-05-22 04:45:31 -0500 )edit
1

That depends what you're trying to accomplish. If you want the point to be in the /map frame, then you should transform into map.

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2012-05-22 05:05:44 -0500 )edit

transformPoint() works for geometry_msgs/PointStamped. I suspect @ZeroCool is interested in sensor_msgs/PointCloud2.

joq gravatar image joq  ( 2012-05-22 05:39:39 -0500 )edit
2

answered 2012-05-22 06:19:40 -0500

joq gravatar image

Assuming you are interested in sensor_msgs/PointCloud2 using C++, I recommend using one of the pcl_ros::transformPointCloud() methods.

As Dan said, you probably want to transform from whatever frame the message was published in to the "/map" frame.

edit flag offensive delete link more

Comments

@joq@Dan Lazewatsky im trying to acomplish something similar which is posted here, http://answers.ros.org/question/83756/how-to-label-and-object-in-map/ I would really appreciate some help.

ctguell gravatar image ctguell  ( 2013-09-26 09:42:04 -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

Stats

Asked: 2012-05-22 02:00:17 -0500

Seen: 2,132 times

Last updated: May 22 '12