Ask Your Question

Rotating a point cloud

asked 2019-05-23 19:39:45 -0500

akhilesh gravatar image

I am visualizing a point cloud in rviz which has its oriented in a different way. Its as if the kinect is on the z axis so I need to rotate the point cloud to visualize it along the x axis. I have subscribed to the topic that gives the rotation (in quaternion) and translation of the point cloud but I need help to republish that new rotation on to a different frame to view both frames together.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-05-24 06:21:40 -0500

updated 2019-05-24 06:29:15 -0500

This sounds as though it's a question of coordinate frames.

You don't need modify the point cloud data to do this you can instead set your RVIZ global frame to a suitable frame that it will appear in the orientation you want.

If you use a static transform publisher to define the rotation you need between the world frame and your kinect frame. When this is setup you will be able to set the RVIZ global frame to the world frame defined in the static transform, then you should see the point cloud as you expect.

You might also want to have a look at REP 103 which defines the coordinate conventions in ROS, the convention is different for optical sensors such as your kinect than it is for robotic platforms. This difference is the cause of your issue.

edit flag offensive delete link more


This different is probably the cause of your issue.

Not probably, it is the cause here.

This is such a common question that I'm wondering how we can make this more obvious / explain it clearer. Just to avoid the myriad of ROS Answers posts about "my pointcloud is on the ceiling".

gvdhoorn gravatar image gvdhoorn  ( 2019-05-24 06:27:19 -0500 )edit

Fair, point. Updated

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-05-24 06:29:28 -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


Asked: 2019-05-23 19:39:45 -0500

Seen: 941 times

Last updated: May 24 '19