0
$\begingroup$

Rosanswers logo

Is there a way to display multiple, separate pcd pointclouds (from pcd_to_pointcloud) on the same rviz screen?

I published the first pointcloud by doing: $ pcd_to_pointcloud first_pc.pcd .1 /cloud_pcd:=first_pc

The frame_id for this is base_link, so the pointcloud appears when I put /base_link as the fixed frame (under global options) and first_pc as the topic.

Then I try to publish the second pointcloud by doing: $ pcd_to_pointcloud second_pc.pcd .1 /cloud_pcd:=second_pc

When I run this, the first pointcloud stops publishing and I get an error saying 'New node registered with the same name'- I think because both pointclouds are being published on the same fixed_frame, /base_link- although they are publishing on different topics.

But when I try to change the frame id (to something like _frame_id:=/odom), I have to change the fixed frame to /odom to see the pointcloud in rviz, which is not good. I want to see all pointclouds (first_pc, second_pc, etc) on one rviz screen. Is that possible?


Originally posted by mdegges on ROS Answers with karma: 57 on 2013-04-11

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

This is a collision of node names, which are independent of topic or frame names. Use the special parameter __name to fix this:

 pcd_to_pointcloud first_pc.pcd .1 /cloud_pcd:=first_pc __name:=first_pc
 pcd_to_pointcloud second_pc.pcd .1 /cloud_pcd:=second_pc __name:=second_pc

Originally posted by dgossow with karma: 1444 on 2013-04-11

This answer was ACCEPTED on the original site

Post score: 5

$\endgroup$

Your Answer

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