New Package Alert!!! LaserScan Relay

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.

For users who are using multiple Lidar and want to get all the data in one topic (for AMCL primarily), this package is for you: GitHub - epikrobotiksoftware/Laser-Relay: Merge two laser scan topics


Could this be the ROS 2 spiritual successor to laserscan_multi_merger?

@ruffsl keyword being “spiritual”, they don’t use the same methods and structure.

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.

Am I missing something?

@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 :palms_up_together:

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

FYI, there is a ROS2 port for ira_laser_tools. In my opinion, merging two lidars don’t mean publishing them into the same topic name.

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).

Wanted to share that I recently forked and updated ira_laser_tools for ROS2 so that it uses composition, link here