ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I would say it completely depends on your system configuration. Normally, it should not be a problem when both lasers publish their data on the same topic since the LaserScan message contains a header with a frame_id and a time stamp. Of course, this requires a valid TF tree and the laser drivers to be configured to use a different frame id for each scanner. Amcl, for instance, supports several lasers on one topic.
By using topic remapping, you can configure your laser scanners to publish on different topics. Have a look at this question/answer for more information on that.
Finally, if you don't want to use the LaserScan message but a point cloud, you can use the laser_assembler
node as @weiin suggests in his answer. However, this solution won't work for amcl or any other node that requires a LaserScan message.
On our robot, we use two Hokuyo lasers for amcl. Both laser drivers publish on separate topics and in the amcl node, we relay both topics to amcl's input topic using topic_tools' relau. That way, we can access the laser scans separately or, if needed, on one single topic.
2 | No.2 Revision |
I would say it completely depends on your system configuration. Normally, it should not be a problem when both lasers publish their data on the same topic since the LaserScan message contains a header with a frame_id and a time stamp. Of course, this requires a valid TF tree and the laser drivers to be configured to use a different frame id for each scanner. Amcl, for instance, supports several lasers on one topic.
By using topic remapping, you can configure your laser scanners to publish on different topics. Have a look at this question/answer for more information on that.
Finally, if you don't want to use the LaserScan message but a point cloud, you can use the laser_assembler
node as @weiin suggests in his answer. However, this solution won't work for amcl or any other node that requires a LaserScan message.
On our robot, we use two Hokuyo lasers for amcl. Both laser drivers publish on separate topics and in the amcl node, we relay both topics to amcl's input topic using topic_tools' relau. relay. That way, we can access the laser scans separately or, if needed, on one single topic.