Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

When the controller manager loads a controller, it is in the stopped state. You need to explicitly start it to transition to a running state. You can check a controller's state by calling /controller_manager/list_controllers

This the usual flow:

Load a controller: Use the /controller_manager/load_controller service

  • Precondition: Controller config loaded in the ROS param server.
  • Effect: Calls the controller's init(...) method.
  • Postcondition: Controller is loaded, but stopped.

Start a controller: Use the /controller_manager/switch_controller service (start_controllers field)

  • Precondition: Controller already loaded and stopped. Resources to claim are available.
  • Effect: Calls the controller's starting(...) method
  • Postcondition: Running controller.

Stop a controller: Use the /controller_manager/switch_controller service (stop_controllers field)

  • Precondition: Controller is running.
  • Effect: Calls the controller's stopping(...) method
  • Postcondition: Stopped (but still loaded) controller.

Unload a controller: Use the /controller_manager/load_controller service

  • Precondition: Controller is stopped.
  • Effect: Calls controller destructor.
  • Postcondition: Controller no longer managed by the controller_manager.