Draft: Namespace Support#29
Closed
sp-sophia-labs wants to merge 16 commits intoturtlebot:galacticfrom
Closed
Conversation
Contributor
|
@sp-sophia-labs Have you tried using See https://github.com/ros-planning/navigation2/blob/main/nav2_bringup/launch/bringup_launch.py#:~:text=bringup_cmd_group%20%3D%20GroupAction,%3Dnamespace)%2C for an example. |
Author
|
@roni-kreinin I've seen this while trying to make navigation2 work with namespaces. I haven't tried this yet for the rest of the code but it's definitely a more elegant solution to the entry duplication that we have right now. I'll try it out once I'm done with the navigation issues |
Contributor
|
Closing this as #35 is now merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The goal of this PR is to enable namespaces for the turtlebot4 robot to be able to spawn multiple instances in the same simulation space without resorting to isolated networks
Type of change: new feature. This change does not fix any open issue
How has this been tested?
We have created a project with dependencies pointing to specific commits (submodules) here: https://github.com/sp-sophia-labs/turtlebot4_multi_sim (details in the dependency section below). Reviewers may clone the project and replicate exactly what we use for testing. You can follow the readme from the project or use the following:
Launch the world and the first turtlebot4 instance:
ros2 launch turtlebot4_ignition_bringup ignition.launch.py namespace:=robot_0 robot_name:=robot_zeroAlternatively, launching the robot without namespaces is still available:
ros2 launch turtlebot4_ignition_bringup ignition.launch.pyIn a separate terminal, spawn another turtlebot4 instance with different name, namespace and pose:
ros2 launch turtlebot4_ignition_bringup turtlebot4_spawn.launch.py namespace:=robot_1 robot_name:=robot_one y:=1You can change the x, y, z, and yaw params to spawn the robot where needed
Once the gazebo simulation has started, you can modify the TurtleBot4 HMI field to reflect on the new robot name. It defaults to "turtlebot4"
This will correctly map the Turtlebot4's simulated interface to one of your robots
Dependencies
We have modified other packages outside of turtlebot4_simulator to be able to spawn multiple turtlebot4 in simulation with namespaces. Here is the list with a short description of the reasons for the changes:
create3_sim Draft: Namespace Support iRobotEducation/create3_sim#189, resolving dependencies
rclcpp ros2/rclcpp@81d6f89, no official release yet
We'll update the dependencies above according to PR and release status
Known Issues
While topics, nodes and frames look good with namespaces, navigation2 still refuses to work properly with namespaces. We are still trying to figure out the correct configuration for the amcl node (cf. https://github.com/sp-sophia-labs/turtlebot4/blob/feat/turtlebot4_namespace/turtlebot4_navigation/config/nav2.yaml). Help would be appreciated
Checklist