ros-controls / ros2_control

Generic and simple controls framework for ROS 2
https://control.ros.org
Apache License 2.0
517 stars 307 forks source link

Add `set_controller_state` service to controller manager #760

Open destogl opened 2 years ago

destogl commented 2 years ago

Background

Service should be equivalent to set_hardware_compoent_state so that controller manager takes care of all transitions to the desired state. This service should replace than all the individual services used in CLI.

Instructions

Hi, this is a good-first-issue issue. This means we've worked to make it more legible to people who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

We're interested in helping you take the first step, and can answer questions and help you out along the way. Note that we're especially interested in contributions from underrepresented groups!

We know that creating a pull request is the biggest barrier for new contributors. This issue is for you πŸ’

If you have contributed before, consider leaving this PR for someone new, and looking through our general bug issues. Thanks!

πŸ€” What you will need to know.

Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.

πŸ“‹ Step by Step

Is someone else already working on this?

πŸ”—- We encourage contributors to link to the original issue in their pull request so all users can easily see if someone's already started on it.

πŸ‘₯- If someone seems stuck, offer them some help!

πŸ€”β“ Questions?

Don’t hesitate to ask questions or to get help if you feel like you are getting stuck. For example leave a comment below! Furthermore, you find helpful resources here:

Good luck with your first issue!

bmagyar commented 1 year ago

@destogl is this still relevant?

debanik123 commented 1 month ago

serice to reload controller -->

ros2 control list_controllers ros2 service call /controller_manager/switch_controller controller_manager_msgs/srv/SwitchController "{start_controllers: [''], stop_controllers: [''], strictness: 1, start_asap: true}" ros2 control list_controllers ros2 service call /controller_manager/unload_controller controller_manager_msgs/srv/UnloadController "{name: ''}" ros2 control list_controllers ros2 service call /controller_manager/load_controller controller_manager_msgs/srv/LoadController "{name: ''}" ros2 control list_controllers ros2 service call /controller_manager/configure_controller controller_manager_msgs/srv/ConfigureController "{name: ''}" ros2 control list_controllers ros2 service call /controller_manager/switch_controller controller_manager_msgs/srv/SwitchController "{start_controllers: [''], stop_controllers: [''], strictness: 1, start_asap: true}" ros2 control list_controllers

or, ros2 control set_controller_state inactive ros2 control unload_controller ros2 control load_controller --set-state active