0
$\begingroup$

Rosanswers logo

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!


Originally posted by Jay4Ros on ROS Answers with karma: 35 on 2015-12-04

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by sven-hoek with karma: 26 on 2015-12-04

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Jay4Ros on 2015-12-07:
I ended up using the static_transform_publisher, I did not know about that one yet :)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.