ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

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 (, but I still don't understand them well.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

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


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

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

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


@joq@Dan Lazewatsky im trying to acomplish something similar which is posted here, I would really appreciate some help.

ctguell gravatar image ctguell  ( 2013-09-26 09:42:04 -0500 )edit

Question Tools


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

Seen: 2,792 times

Last updated: May 22 '12