Skip to content

Conversation

@saikishor
Copy link
Member

@saikishor saikishor commented Aug 20, 2024

As mentioned in #1661, @christophfroehlich has mentioned that the ros2controlcli is lacking some features to load the parameters, etc. I've modified the ros2controlcli to be able to set the parameters from the command line and as well to be able to work with the namespaced controller managers etc

now you can load the controllers by passing the params file relative or absolute path and also be able to pass --ros-args
to each of the ros2controlcli verbs to be able to work with the namespaced controllers and controller_manager

ros2 control load_controller joint_state_broadcaster
ros2 control load_controller forward_position_controller config/rrbot_controllers.yaml --set-state active
ros2 control load_controller forward_position_controller /tmp/ws/src/ros2_control_demos/example_1/bringup/config/rrbot_controllers.yaml --set-state active
ros2 control load_controller forward_position_controller config/rrbot_controllers.yaml --set-state active --ros-args -r __ns:=namespace1

@codecov
Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.71%. Comparing base (8552dcf) to head (9060f5b).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
.../controller_manager/controller_manager_services.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1703   +/-   ##
=======================================
  Coverage   86.71%   86.71%           
=======================================
  Files         116      116           
  Lines       10695    10697    +2     
  Branches      984      984           
=======================================
+ Hits         9274     9276    +2     
  Misses       1064     1064           
  Partials      357      357           
Flag Coverage Δ
unittests 86.71% <83.33%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
.../controller_manager/controller_manager_services.py 70.49% <83.33%> (+0.49%) ⬆️

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

LGTM. I tested the paramsfile successfully (but not the namespaceing).

@bmagyar bmagyar merged commit 4472287 into ros-controls:master Sep 11, 2024
@saikishor saikishor deleted the update/ros2controlcli branch December 17, 2024 16:16
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.

3 participants