ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
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 image dhindhimathai  ( 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 image Choco93  ( 2018-10-17 04:00:58 -0500 )edit

Question Tools

1 follower


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

Seen: 160 times

Last updated: Oct 11 '18