Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-robot SLAM #541

Open
wants to merge 20 commits into
base: ros1_multirobot
Choose a base branch
from

Conversation

jsongCMU
Copy link
Contributor

@jsongCMU jsongCMU commented Oct 16, 2022


Basic Info

Info Please fill out this column
Ticket(s) this addresses (#76)
Primary OS tested on (Ubuntu 20.04)
Robotic platform tested on (Gazebo simulation, Khepera IV robots with LRF modules)

Multi-robot mapping in Gazebo
mrslam_mapping
Multi-robot loop closure in Gazebo
mrslam_loopclosure
Mapping Tepper Locker Area using 5 Kheepra IV Robots
mrslam_fvd_compressed

Much of this work was originally done for RoboSAR (Carnegie Mellon University, Advanced Agent-Robotics Technology Lab; capstone project for Master in Robotics Systems Development 2023), a multi-robot search and rescue system. Part of the MrSLAM system has been ported for this PR; see the relevant pages here (organization, MrSLAM repo)

Description of contribution in a few bullet points

  • Extends SLAM to map and localize multiple robots, each with one laser scanner
  • Also does multi-robot loop closure
  • Fixes bug where first constraint between robots is not computed properly; this is fixed in ros2 branch already
  • All robots add to and build on the same pose graph

Description of documentation updates required from your changes

  • Robots must start close to each other, facing the same thing; relative poses are determined using laser scan matching!!!
  • First robot to come online defines world origin
  • odom_frame and base_frame are now odom_frames and base_frames
  • scan_topic is now laser_topics
  • number of elements in odom_frames, base_frames, and laser_topics must all be equal, one for each robot
  • Laser is named after laser frame instead of "Custom Described Lidar"

Future work that may be required in bullet points

  • Tested for online sync and async modes; need testing for other modes as well
  • Unsure how to handle multiple laser scan topics in loadSerializedPoseGraph
  • May want to have different loop closure parameters for single robot loop closing on itself, and between loop closing across multiple agents
  • Add param to disable multi-robot loop closure, in case application does not want this
  • Currently only supports robots with one laser scanner each; extend to multiple lasers
  • Laser scan matching is used to determine initial relative poses. Useful to have different parameters for initial laser scan matching (which may require searching over a much larger space; fine since done during startup) than laser scan matching being done normally during operation

@jsongCMU jsongCMU marked this pull request as ready for review October 16, 2022 20:59
@SteveMacenski
Copy link
Owner

I'm wondering right now if this might more appropriately targeted to the multi-laser branch or if I can make a new multi-robot branch for this work to live in. For ROS 1, its EOL with no new distributions coming out so we can't really make an API/ABI change and release binaries that this would require. But its still very useful, so I could make a noetic-multirobot branch for this to live in where we can make some more substantial changes for those users that want it.

Then add changes to the readme for just that branch with notes on top about the requirements (start in localized area) and other multirobot specific documentation.

What do you think?

slam_toolbox/include/slam_toolbox/get_pose_helper.hpp Outdated Show resolved Hide resolved
map_frame: map
base_frame: base_footprint
scan_topic: /scan
odom_frames: ["robot1/odom", "robot2/odom"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make these changes to all the yaml files so that they all work in this branch with the change of types

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the yaml for sync and async; I'm not currently sure what would be the best way to handle localization and life-long, since they're very different algorithms; what're your thoughts on this?

slam_toolbox/include/slam_toolbox/slam_toolbox_common.hpp Outdated Show resolved Hide resolved
slam_toolbox/src/slam_toolbox_async.cpp Outdated Show resolved Hide resolved
slam_toolbox/src/slam_toolbox_common.cpp Outdated Show resolved Hide resolved
slam_toolbox/src/slam_toolbox_common.cpp Outdated Show resolved Hide resolved
slam_toolbox/src/slam_toolbox_common.cpp Outdated Show resolved Hide resolved
@SteveMacenski
Copy link
Owner

SteveMacenski commented Dec 6, 2022

I added a new branch ros1_multirobot you should change this PR to target

Add that first GIF to the readme! Its very illustrative and concise

@jsongCMU
Copy link
Contributor Author

I'm wondering right now if this might more appropriately targeted to the multi-laser branch or if I can make a new multi-robot branch for this work to live in. For ROS 1, its EOL with no new distributions coming out so we can't really make an API/ABI change and release binaries that this would require. But its still very useful, so I could make a noetic-multirobot branch for this to live in where we can make some more substantial changes for those users that want it.

Then add changes to the readme for just that branch with notes on top about the requirements (start in localized area) and other multirobot specific documentation.

What do you think?

I added a new branch ros1_multirobot you should change this PR to target

Add that first GIF to the readme! Its very illustrative and concise

Sounds good. I wasn't sure how to make this fully backwards compatible, since a lot is changing, so a fresh new branch would be best. I'll change the target

@jsongCMU jsongCMU changed the base branch from noetic-devel to ros1_multirobot December 19, 2022 02:47
@jsongCMU
Copy link
Contributor Author

jsongCMU commented Jan 2, 2023

image
Pose graph color varies for each robot (node and edge colors). Edges between pose graphs of different robots are solid red. Colors are assigned randomly; tested with 6 robots, and all colors look good.

@Jayden-F
Copy link

Hello, I hope someone can help me, I am trying to find a way to perform multi-robot slam in ROS2. Are there any plans to make this available in ROS2? or do you know of any packages in ROS2 that already implement multi-robot slam? Thank you

@SteveMacenski
Copy link
Owner

My plan would be to have this in ROS 2 once its in ROS 1 here, yes!

@jsongCMU
Copy link
Contributor Author

jsongCMU commented Feb 5, 2023

Updated README with info on Multi-Robot SLAM + GIF

@Alex-Beh
Copy link

Hi all, I am interested on this feature also and willing to contribute also. May I know what is the current plan & progress for this PR?

@jsongCMU
Copy link
Contributor Author

Synchronous and asynchornous SLAM are working. Localization and life long mapping are still TODO's. Currently overwhelmed with other things, so was going to resume PR around June

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants