-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add support for multi-robot nav2 simulation #1058
Conversation
@@ -34,7 +34,8 @@ DwbController::DwbController() | |||
RCLCPP_INFO(get_logger(), "Creating"); | |||
|
|||
// The costmap node is used in the implementation of the DWB controller | |||
costmap_ros_ = std::make_shared<nav2_costmap_2d::Costmap2DROS>("local_costmap"); | |||
costmap_ros_ = std::make_shared<nav2_costmap_2d::Costmap2DROS>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The local namespace + name seems to be the same, is that something you expect to be true for the costmaps? Maybe we can reduce this to a single parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we could just pass one argument for both and keep the current namespacing:
Robot1/global_costmap/global_costmap
Robot1/local_costmap/local_costmap
However, I'm thinking that probably better naming could be:
Robot1/dwb/costmap
Robot2/world_model/costmap
In which case the local namespace and node's name are now different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, namespacing the costmaps differently is not a change I'm planning to do now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that might be a pain if you want to do something like having another server subbed to the costmap to run some calculation, since then the costmap will depend on the controller type. I just think its nicer to have the first version, but I don't have a strong opinion either way
ce3d095
to
baac919
Compare
Multi-robot bring-up is currently broken; I'm in the middle to rebasing against Eloquent and Nav2/Master. This branch is on a working state if built against Dashing. |
Submitted issue ros2/launch#325 and proposed fix preventing from executing |
Submitted issue ros2/rviz#442 and found fix preventing from namespacing RVIZ and remapping topics. |
Codecov Report
@@ Coverage Diff @@
## master #1058 +/- ##
==========================================
+ Coverage 28.8% 35.43% +6.62%
==========================================
Files 241 241
Lines 11201 11205 +4
Branches 3689 4382 +693
==========================================
+ Hits 3227 3970 +743
+ Misses 5681 4495 -1186
- Partials 2293 2740 +447
Continue to review full report at Codecov.
|
36ef4cd
to
896965f
Compare
on a file. Passing an rviz config file with topics nav2_namespaced according to the robot's name.
Updated launch file to launch RVIZ as node
Using the new nav2_common.Node in launch files to avoid duplicated definition of Node (one with remappings and a second without) Cleaning up import definitions
4e5e1f3
to
1e4d48d
Compare
PR is too big to review, closing in favor of stacked PRs. |
Basic Info
Description of contribution in a few bullet points
Enabling multiple robots running nav2 in simulation. It's not ready for prime time, the purpose is to provide interested parties a glance into the work done so far.
The branch should be built against ROS2 master:
Once the tasks mentioned below are completed, I will create ~3 PRs to merge the work and get more detailed feedback.
For a video, click the image below.
Work-in-progress
To do before submitting the work for review:
nav2_simulation_launch.py
.spawn_turtlebot3
tonav2_bringup
launch_ros.actions.Node
to conditionalize remappings -- remappings are only applied when launching multiple robots.Future work
To do after the initial solution is merged:
/map
&/cmd_vel
to relative namespacesRobotsLayer
inCostmap2D
to avoid bumping into each other.PushNodeRemapping
action. upstream ticket to prevent defining remaps without context.