Ask Your Question

Pointcloud transform issue

asked 2018-10-11 08:49:53 -0500

Choco93 gravatar image

I have a setup where I am fusing PointCloud2 and cameras to get XYZIRGB cloud.

pcl::PointCloud<XYZIRGB> points_front, points_back;

Both points_back and points_front come from a different lidar-camera pair. I want to publish one stream of cloud instead of two. For that I am concatenating them, but them I have to publish it with a single frame_id and that is messing where my points should show up on rviz.

points_front.insert(points_front.end(), points_back.begin(), points_back.end());
points_front.header.frame_id = "cam_front";

This will show all the points wrt front camera. Does someone have any idea for workaround this thing?

edit retag flag offensive close merge delete



I also think that it's an issue with not transforming the points into a single frame before concatenating them. Just concatenating and putting the same header.frame_id won't work.

dhindhimathai gravatar imagedhindhimathai ( 2018-10-14 02:34:05 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-10-11 09:05:06 -0500

gvdhoorn gravatar image

transform the entire back cloud into the front frame, concatenate them and then publish with the front frame?

edit flag offensive delete link more


Thanks for the responses, it worked. Can you put it as an answer so I can close the question.

Choco93 gravatar imageChoco93 ( 2018-10-17 04:00:58 -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

1 follower


Asked: 2018-10-11 08:49:53 -0500

Seen: 38 times

Last updated: Oct 11 '18