Hi, we have multiple Robots on ROS2 Foxy and we would like to use Navigation2 with the slam_toolbox.
Almost all of our robots have two laser scanners which seems to be not supported anywhere with the exception of cartographer, which is poorly supported on ROS2. I don't really understand the reason behind this, because this is a common issue.
I found this https://github.com/SteveMacenski/slam_toolbox/issues/303 where the developer of the slam_toolbox states:
There is no support for multi-laser configs. Try a laser scan assembler.
I found laser_assembler which has a ROS2 branch, but the last commit is from 2018 and the code base is 9 years old. The documentation states that this package will consume multiple LaserScan messages and output one PointCloud which is not an acceptable input format for the slam_toolbox.
There is also the ira_laser_tools package which does the same, but is currently not available for ROS2. But this package can output a merged_scan message, which is a LaserScan message including a best fit for all other scans. This is created from the merged PointCloud.
Currently, I think all solutions I found are bad and there are several reasons:
- Converting everything to one PointCloud and then creating a new LaserScan is slow and has some other problems:
- Time: All messages have a time stamp, which is critical for SLAM, and now all of those are lumped into one. This should degrade the SLAM performance.
- The new merged LaserScan is only a best fit. It is not possible to merge two LaserScan messages from different frames into one new message without data loss.
- I think it weird that this is not supported by the slam_toolbox, because they even support cloud mapping from multiple robots. I mean two scanners on one robot isn't that different. The only difference there is the tf tree.
What do you think is the best solution for this? Should we make an effort to port the ira_laser_tools package to ROS2 or, what is in my opinion the better option, accept multiple LaserScan topics (slam_toolbox, nav2, ...).
Edit: Yes, it is not hard to merge scans together, but that is not my question. Please state what you think is the better solution and why. Please respond to the arguments listed above.
PS: The laser scanners are aligned to one plane, so this is still 2D SLAM.
Originally posted by Darkproduct on ROS Answers with karma: 100 on 2021-11-23
Post score: 0