Skip to content

Rewrite the scan topic costmap plugins for multi-robot(namespace) before launch navigation.#3572

Merged
SteveMacenski merged 4 commits intoros-navigation:mainfrom
lge-ros2:rewrite_param-multirobot-namespace-topic
Aug 18, 2023
Merged

Rewrite the scan topic costmap plugins for multi-robot(namespace) before launch navigation.#3572
SteveMacenski merged 4 commits intoros-navigation:mainfrom
lge-ros2:rewrite_param-multirobot-namespace-topic

Conversation

@hyunseok-yang
Copy link
Copy Markdown
Contributor


Basic Info

Info Please fill out this column
Ticket(s) this addresses N/A
Primary OS tested on Ubuntu
Robotic platform tested on CLOiSim

Description of contribution in a few bullet points

This changes make it more convinient to manage nav2_params.yaml file for multi-robot environment and easy to launch the navigation.

According to latest guideline, each robot requires different nav2_param files since absoulte path of topic ifor scan is required in local_costmap/global_costmap node.

if we set the topic name without slash'/' like 'scan', rclpp node will add prefix automatically for example , local_costmap/local_costmap/scan. So we should specify absoulute path such as /scan or /namespace/scan

But, the code I suggested will rewrite the value for the key 'topic:'.
As far as I know, 'topic' key is only used for costmap plugins

I think this changes quite make sense. :)

Description of documentation updates required from your changes

For multi-robot launch, it should be launched with namespace leading prefix '/'.

ros2 launch nav2_bringup bringup_launch.py  map:=install/cloi_external_config/share/cloi_external_config/map/seocho_tower_B1F_0.yaml use_namespace:=True namespace:=/acloi00

This shall try to subscribe local_costmap/local_costmap/acloi00/scan.

ros2 launch nav2_bringup bringup_launch.py  map:=install/cloi_external_config/share/cloi_external_config/map/seocho_tower_B1F_0.yaml use_namespace:=True namespace:=acloi00

So the guideline for mutli-robot bringup should be noticed.


Future work that may be required in bullet points

First time when I faced this inconvenient environemnt, I'd like to describe the 'param_rewirtes' like this.

{'local_costmap.local_costmap.ros__parameters.*.*.topic': (namespace,'/scan')}

I tried to modify RewrittenYaml() class what I thougt and expected but gave up :) because I''m not familiar with this class.

For Maintainers:

  • Check that any new parameters added are updated in navigation.ros.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists

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

2 participants