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

Change the orientation of a PointCloud

asked 2019-06-26 06:36:56 -0500

hachbani gravatar image

updated 2019-06-26 06:37:29 -0500

Hello, I'm trying to change the orientation of a pointcloud topic, I want to change it according to the following equation :

let's say (x,y,z) are the original pointcloud coordinates, and (x',y',z') are the pointcloud cooridnates after the transformation. I want :

x' = -y | y' = -z | z' = x

How can I do that please ?

edit retag flag offensive close merge delete

Comments

The transformation you describe is a proper rotation (I.e. not a reflection or distortion of the cloud. The question is why do you need to do this and what format is your point cloud in?

All point cloud types used by ROS describe the frame that the points are represented in. It's possible you just need to update this depending on your application. Can you tell us why you need to rotate the points in this cloud and we can let you know what the best solution will be.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-06-26 07:33:58 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2019-06-26 09:11:33 -0500

ChuiV gravatar image

One option is to add a static transform publisher, then change the frame of the point cloud to match the static transform. The static transform will let you define rotations and translations for your point cloud. Then you can used the tf2 library to perform the translation for you. https://wiki.ros.org/tf2 should give you more information on using TF2, as well as a few tutorials.

edit flag offensive delete link more
0

answered 2021-03-12 15:21:07 -0500

Suyashhchougule gravatar image

updated 2021-03-12 16:02:45 -0500

jayess gravatar image

This worked for me

<node pkg="tf" type="static_transform_publisher" name="base_to_kinect" args=" x y z r p y base_link kinect_camera 100" />

now you can adjust x y z r p y

edit flag offensive delete link more

Comments

(https://answers.ros.org/question/2183...)

for some this might also work

Suyashhchougule gravatar image Suyashhchougule  ( 2021-03-13 03:32:08 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-06-26 06:36:56 -0500

Seen: 1,041 times

Last updated: Mar 12 '21