ros2_control icon indicating copy to clipboard operation
ros2_control copied to clipboard

Add controller node options args to be able to set controller specific node arguments

Open saikishor opened this issue 1 year ago • 6 comments

A different approach of #1712

    robot_controller_spawner = Node(
        package="controller_manager",
        executable="spawner",
        arguments=["diffbot_base_controller", "--param-file", controller_config, "--controller-ros-args", '--ros-args -r /diffbot_base_controller/cmd_vel:=/cmd_vel'],
    )

Fixes: #1711 Fixes: #1714

saikishor avatar Aug 23 '24 09:08 saikishor

Codecov Report

Attention: Patch coverage is 78.78788% with 7 lines in your changes missing coverage. Please review.

Project coverage is 87.70%. Comparing base (7374c43) to head (32583ca). Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
controller_manager/src/controller_manager.cpp 80.00% 1 Missing and 2 partials :warning:
controller_manager/controller_manager/spawner.py 50.00% 1 Missing and 1 partial :warning:
...r_manager/test/test_controller/test_controller.cpp 50.00% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1713      +/-   ##
==========================================
- Coverage   87.73%   87.70%   -0.04%     
==========================================
  Files         122      122              
  Lines       13010    13043      +33     
  Branches     1165     1170       +5     
==========================================
+ Hits        11414    11439      +25     
- Misses       1165     1169       +4     
- Partials      431      435       +4     
Flag Coverage Δ
unittests 87.70% <78.78%> (-0.04%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...r_manager/test/test_controller/test_controller.hpp 100.00% <ø> (ø)
controller_manager/test/test_spawner_unspawner.cpp 96.56% <100.00%> (+0.08%) :arrow_up:
controller_manager/controller_manager/spawner.py 72.38% <50.00%> (-0.69%) :arrow_down:
...r_manager/test/test_controller/test_controller.cpp 92.15% <50.00%> (-3.59%) :arrow_down:
controller_manager/src/controller_manager.cpp 76.35% <80.00%> (-0.04%) :arrow_down:

codecov[bot] avatar Aug 23 '24 10:08 codecov[bot]

This pull request is in conflict. Could you fix it @saikishor?

mergify[bot] avatar Aug 23 '24 18:08 mergify[bot]

I like, but needs some tests for it and advertisement in the release notes. We could also think of deprecating the "old way" #1712

Tested successfully with ros-controls/ros2_control_demos#577

@christophfroehlich I've added the tests for this case and the release_notes.

Thank you!

saikishor avatar Sep 11 '24 21:09 saikishor

This pull request is in conflict. Could you fix it @saikishor?

mergify[bot] avatar Oct 16 '24 18:10 mergify[bot]

This pull request is in conflict. Could you fix it @saikishor?

mergify[bot] avatar Oct 17 '24 09:10 mergify[bot]

@bmagyar the CI seems to be happy

saikishor avatar Oct 17 '24 10:10 saikishor

I'll add example_interfaces to the debian image used for the CI.

christophfroehlich avatar Oct 29 '24 18:10 christophfroehlich

I'll add example_interfaces to the debian image used for the CI.

Thank you @christophfroehlich

saikishor avatar Oct 29 '24 18:10 saikishor

This pull request is in conflict. Could you fix it @saikishor?

mergify[bot] avatar Oct 30 '24 20:10 mergify[bot]

Is this still needed?

bmagyar avatar Dec 09 '24 19:12 bmagyar

Is this still needed?

@bmagyar yes, we will still need it Right now, we can only override from main one with a hack. This is good to have, then we can relay topic and do things at runtime with spawner, rather than readjusting the ros2_control_node and relaunching

saikishor avatar Dec 09 '24 19:12 saikishor