Being a robotics company that uses ROS primarily in its robot sometimes has disadvantages (not finding the package you need out of the box, missing documentation, etc…), but we still continue to improve and try to help the community in any way we can.
I don’t quite get the point. The node in this package just subscribes to a single LaserScan topic and republishes it onto another topic, so it’s doing the same as topic_tools/relay, but only works for LaserScans.
The launch files start 2 of these nodes and republish the input topics onto the same output topic. Couldn’t the same be achieved by just having the laser scanner drivers publish to the same output topic?
laserscan_multi_merger does much more than that. It subscribes to the output of multiple laser scanners and creates a synthetic laser scan that looks as if it was recorded from a single laser scanner, which is unfortunately required for some packages (gmapping, nav2?) which do not support multiple laser scanners publishing onto the same topic, while others (hector_mapping, amcl) have no problem with that. It’s really time for a ROS2 port of ira_laser_tools! There are some unofficial forks, but nothing released yet.
@Martin_Guenther you are correct in a sense of this is what the package was meant to do, just relaying two topics into an output topic.
As for why not publish the sensor data directly into the same topic is somewhat problematic, sometimes you have to work with every sensor data separately for specific operations (docking, marker discovery, costmap observation source, etc…)
This package gives the best of both worlds without getting into the hassle of creating a synthetic laser scan which can be expensive to calculate.
hoping ira_laser_tools gets ported soon
Hi @Martin_Guenther , @ammar_albakri I need to merge 2 scan data with amcl packages in NAV2. Is there some solution available for ROS2? Please let me know.
@Marcus_Vinicius_Leal The package shared in this thread can achieve what you are looking for, take 2 individual LaserScan topics and merge them into one topic while maintaining the original messages.
Link: Laser Relay
When I last looked at AMCL, it could handle messages from multiple scanners on the single input topic. It will transform each message to base_link before processing. You only need a rostopic relay (or remap).