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

(Rviz <-> point cloud from pcd) transformation

asked 2015-12-04 04:17:32 -0500

Jay4Ros gravatar image

updated 2015-12-04 04:18:35 -0500

Hi!

I am reading in point clouds from *.pcd-files and am visualizing them using RViz. Unfortunately, the point cloud is weirdly oriented:

Look here (the "right" side of the point cloud is actually the floor)

I believe that this is because ROS uses a different coordinate system than PCL (or at least than how these pointclouds have been recorded). How do I display my point cloud correctly?

After reading through some tutorials I think I need to implement a tf-broadcaster that transforms between a "world" frame (ROS coordinate system) and a "pcd" frame (coordinate system used in my files). Then I can set the world-frame as fixed frame in Rviz and as a transformation for the PointCloud2 display my broadcasted transformation. Is that correct? Or is there a more elegant way of getting Rviz to display the point cloud "correctly"?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-12-04 08:03:44 -0500

sven-hoek gravatar image

If you don't want to use a static_transform_publisher you could use one of the pcl_ros::transformPointCloud functions either with a tf::Transform object representing the needed transformation or an Eigen::Matrix4f.

See pcl_ros::transformPointCloud or pcl_ros::transformPointCloud

edit flag offensive delete link more

Comments

I ended up using the static_transform_publisher, I did not know about that one yet :)

Jay4Ros gravatar image Jay4Ros  ( 2015-12-07 09:27:19 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-12-04 04:17:32 -0500

Seen: 1,439 times

Last updated: Dec 04 '15