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

How to transform a point cloud from camera coordinates to world coordinates

asked 2011-03-20 08:23:27 -0500

updated 2016-10-24 09:00:08 -0500

ngrennan gravatar image

I have a Kinect sensor at about 1.5 meters elevation angled downwards by 40 degrees and which can also pan to arbitrary positions, and I'd like to transform the camera/depth/points point cloud from camera coordinates to world coordinates (or an egocentric world frame) so that I can then produce a correct fake laser scan from a fixed horizontally aligned virtual laser scanner at the base of the robot. How do I do this?

So far I've been trying pcl_ros::transformPointCloud, but without much success. I don't want to actually move the points (as seen in Rviz), merely reassign their coordinates relative to a different frame.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-03-20 08:32:26 -0500

tfoote gravatar image

pcl_ros::transformPointCloud is exactly what you want. It computes the positions of each point with respect to a different coordinate frame.

edit flag offensive delete link more


It might be that I've been using the wrong variant. I have been explicitly calculating a transform from one frame to another, then applying it, but that's probably not what I should be doing.
JediHamster gravatar image JediHamster  ( 2011-03-20 08:42:31 -0500 )edit
Ok, I think I've got it. The variant I needed was pcl_ros::transformPointCloud(destination_frame,from_cloud,to_cloud,TransformListener)
JediHamster gravatar image JediHamster  ( 2011-03-20 08:47:42 -0500 )edit

Question Tools



Asked: 2011-03-20 08:23:27 -0500

Seen: 3,936 times

Last updated: Mar 20 '11