# New Package Alert!!! LaserScan Relay

**URL:** <https://discourse.openrobotics.org/t/new-package-alert-laserscan-relay/30186>\
**Category:** Foxy\
**Tags:** release, ros2, foxy, lidar\
**Created:** [March 7, 2023, 11:33pm UTC](https://discourse.openrobotics.org/t/new-package-alert-laserscan-relay/30186 "2023-03-07T23:33:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ammar\_albakri](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/ammar_albakri/32/16432_2.png) [@ammar\_albakri](https://discourse.openrobotics.org/u/ammar_albakri)\
**Post date:** [March 7, 2023, 11:33pm UTC](https://discourse.openrobotics.org/t/new-package-alert-laserscan-relay/30186/1 "2023-03-07T23:33:55Z")

</div>

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](https://github.com/epikrobotiksoftware/Laser-Relay)

---

<div class="post-metadata">

**Author:** ![ruffsl](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/ruffsl/32/83_2.png) [@ruffsl](https://discourse.openrobotics.org/u/ruffsl)\
**Post date:** [March 8, 2023, 10:05am UTC](https://discourse.openrobotics.org/t/new-package-alert-laserscan-relay/30186/2 "2023-03-08T10:05:21Z")

</div>

Could this be the ROS 2 spiritual successor to `laserscan_multi_merger`?

> **[ira\_laser\_tools - ROS Wiki](https://wiki.ros.org/ira_laser_tools)**

---

<div class="post-metadata">

**Author:** ![ammar\_albakri](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/ammar_albakri/32/16432_2.png) [@ammar\_albakri](https://discourse.openrobotics.org/u/ammar_albakri)\
**Post date:** [March 8, 2023, 11:13am UTC](https://discourse.openrobotics.org/t/new-package-alert-laserscan-relay/30186/3 "2023-03-08T11:13:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Martin\_Guenther](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/martin_guenther/32/91_2.png) [@Martin\_Guenther](https://discourse.openrobotics.org/u/Martin_Guenther)\
**Post date:** [March 8, 2023, 12:01pm UTC](https://discourse.openrobotics.org/t/new-package-alert-laserscan-relay/30186/4 "2023-03-08T12:01:25Z")

</div>

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](https://github.com/ros-tooling/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?

---

<div class="post-metadata">

**Author:** ![ammar\_albakri](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/ammar_albakri/32/16432_2.png) [@ammar\_albakri](https://discourse.openrobotics.org/u/ammar_albakri)\
**Post date:** [March 8, 2023, 12:30pm UTC](https://discourse.openrobotics.org/t/new-package-alert-laserscan-relay/30186/5 "2023-03-08T12:30:09Z")

</div>

@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 🤲

---

<div class="post-metadata">

**Author:** ![Marcus\_Vinicius\_Leal](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/marcus_vinicius_leal/32/9813_2.png) [@Marcus\_Vinicius\_Leal](https://discourse.openrobotics.org/u/Marcus_Vinicius_Leal)\
**Post date:** [July 17, 2023, 11:25pm UTC](https://discourse.openrobotics.org/t/new-package-alert-laserscan-relay/30186/6 "2023-07-17T23:25:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ammar\_albakri](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/ammar_albakri/32/16432_2.png) [@ammar\_albakri](https://discourse.openrobotics.org/u/ammar_albakri)\
**Post date:** [August 15, 2023, 10:47am UTC](https://discourse.openrobotics.org/t/new-package-alert-laserscan-relay/30186/7 "2023-08-15T10:47:40Z")

</div>

@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](https://github.com/epikrobotiksoftware/Laser-Relay)

---

<div class="post-metadata">

**Author:** ![Chun\_Jye\_Beh](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/chun_jye_beh/32/12264_2.png) [@Chun\_Jye\_Beh](https://discourse.openrobotics.org/u/Chun_Jye_Beh)\
**Post date:** [August 16, 2023, 8:43am UTC](https://discourse.openrobotics.org/t/new-package-alert-laserscan-relay/30186/8 "2023-08-16T08:43:22Z")

</div>

FYI, there is a [ROS2 port](https://github.com/MSDRobotics/ira_laser_tools/tree/humble) for ira\_laser\_tools. In my opinion, merging two lidars don’t mean publishing them into the same topic name.

---

<div class="post-metadata">

**Author:** ![Rayman](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/rayman/32/268_2.png) [@Rayman](https://discourse.openrobotics.org/u/Rayman)\
**Post date:** [August 21, 2023, 1:33pm UTC](https://discourse.openrobotics.org/t/new-package-alert-laserscan-relay/30186/9 "2023-08-21T13:33:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Serafadam](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/serafadam/32/12796_2.png) [@Serafadam](https://discourse.openrobotics.org/u/Serafadam)\
**Post date:** [August 22, 2023, 7:23am UTC](https://discourse.openrobotics.org/t/new-package-alert-laserscan-relay/30186/10 "2023-08-22T07:23:16Z")

</div>

Wanted to share that I recently forked and updated `ira_laser_tools` for ROS2 so that it uses composition, link [here](https://github.com/Serafadam/ira_laser_tools)
