ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
What you're trying to do seems reasonable.
The error you have happens when you create two subscribers on the same topic name, with different message types and checksums.
From you description, it sounds like your data is on two separate topics, so I suspect there's a typo or mis-configuration in your code somewhere.
And indeed, here is looks like you create two topic names, but then use the same topic name when subscribing to both topics:
spinner(4), subNameCloud(basetopic + "/cloud"), subNameIr(basetopic + "/ir_image"),
subImageIr(nh, subNameIr, 1), subCloud(nh, subNameIr, 1),
(note using subNameIr
when creating both the Image and Cloud subscribers).
It looks like this should be:
spinner(4), subNameCloud(basetopic + "/cloud"), subNameIr(basetopic + "/ir_image"),
subImageIr(nh, subNameIr, 1), subCloud(nh, subNameCloud, 1),