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

use __node:= in NodeOptions #858

Merged
3 commits merged into from
Jun 17, 2019

Conversation

rotu
Copy link
Contributor

@rotu rotu commented Jun 14, 2019

This way, if __node:= is passed to the node executable, it gets overridden on each subnode and these subnodes get unique names.

Fixes #842

This is a better approach than #851 since it respects other global options, like topic remapping.
To test, run the nav stack with node name overrides in your launch file.

This way, if __node:= is passed to the node executable, it gets overridden on each subnode and these subnodes get unique names.
@cottsay
Copy link
Contributor

cottsay commented Jun 14, 2019

Where possible, you should use get_name() in place of the string that is passed to the central node's constructor. That way both nodes get renamed appropriately if a node name override is supplied.

Copy link
Collaborator

@mkhansenbot mkhansenbot left a comment

Choose a reason for hiding this comment

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

I see one redundant comment line, and you need to pass the lint tools before merge.

I believe this is the test command to run to see the failures:
colcon test --packages-skip nav2_system_tests nav2_dynamic_params nav2_motion_primitives nav2_bt_navigator nav2_costmap_2d nav2_lifecycle_manager nav2_tasks nav2_robot

@codecov
Copy link

codecov bot commented Jun 17, 2019

Codecov Report

Merging #858 into master will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #858      +/-   ##
==========================================
+ Coverage   20.44%   20.48%   +0.04%     
==========================================
  Files         181      181              
  Lines        9305     9317      +12     
  Branches     2259     2268       +9     
==========================================
+ Hits         1902     1909       +7     
- Misses       6320     6323       +3     
- Partials     1083     1085       +2
Impacted Files Coverage Δ
src/navigation2/nav2_util/src/lifecycle_node.cpp 65.21% <0%> (-17.14%) ⬇️
...2/nav2_lifecycle_manager/src/lifecycle_manager.cpp 16.41% <0%> (-0.51%) ⬇️
...gation2/nav2_costmap_2d/plugins/obstacle_layer.cpp 0% <0%> (ø) ⬆️
...on2/nav2_util/include/nav2_util/service_client.hpp 25% <0%> (ø) ⬆️
...navigation2/nav2_bt_navigator/src/bt_navigator.cpp 0% <0%> (ø) ⬆️
...tmap_2d/include/nav2_costmap_2d/obstacle_layer.hpp 0% <0%> (ø) ⬆️
...navigation2/nav2_costmap_2d/src/costmap_2d_ros.cpp 0% <0%> (ø) ⬆️
src/navigation2/nav2_util/src/node_utils.cpp 58.62% <0%> (ø) ⬆️
src/navigation2/nav2_navfn_planner/src/navfn.cpp 46.84% <0%> (+1.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f55645...c55588e. Read the comment docs.

Copy link
Collaborator

@mkhansenbot mkhansenbot left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for cleaning it up. It's passing CI now.

@ghost ghost merged commit d069203 into ros-navigation:master Jun 17, 2019
@rotu rotu deleted the subnode_name_collision branch June 18, 2019 18:12
Forsyth-Creations pushed a commit to Forsyth-Creations/navigation2 that referenced this pull request Feb 19, 2025
This pull request was closed.
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.

Nav2 Nodes cannot be cleanly renamed
4 participants