0
$\begingroup$

Rosanswers logo

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 ?


Originally posted by hachbani on ROS Answers with karma: 13 on 2019-06-26

Post score: 0


Original comments

Comment by PeteBlackerThe3rd on 2019-06-26:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by ChuiV with karma: 1046 on 2019-06-26

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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