|
| SwitchController (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) |
|
| SwitchController (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, std::unique_ptr< ClientInterfaceBase< ListControllersSrv > > list_controllers_client_interface) |
|
void | setSwitchControllerClientInterface (std::unique_ptr< ClientInterfaceBase< SwitchControllerSrv > > switch_controller_client_interface) |
|
| ServiceClientBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) |
| Constructs ServiceClientBehaviorBase using the RclcppClientInterface.
|
|
| ServiceClientBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, std::unique_ptr< ClientInterfaceBase< ListControllersSrv > > client_interface) |
| Constructs ServiceClientBehaviorBase using a user-provided implementation of ClientInterfaceBase.
|
|
virtual | ~ServiceClientBehaviorBase ()=default |
|
| AsyncBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) |
|
virtual | ~AsyncBehaviorBase ()=default |
|
BT::NodeStatus | onStart () override |
| Required implementation of BT::StatefulActionNode::onStart().
|
|
BT::NodeStatus | onRunning () override |
| Required implementation of BT::StatefulActionNode::onRunning().
|
|
void | onHalted () override |
| Required implementation of BT::StatefulActionNode::onHalted().
|
|
void | resetStatus () |
| Resets the internal status of this node.
|
|
| SharedResourcesNode (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) |
| Constructor for SharedResourcesNode. Called by BT::BehaviorTreeFactory when creating a new behavior tree containing this node.
|
|
A Behavior to call the ros2_control switch_controllers
service to activate/deactivate controllers.
This Behavior switches controllers in a ros2_control
controller manager. Given a list of controllers to activate/deactivate, a service request is dispatched to switch the active ros2_control
controllers accordingly. It can be configured to automatically deactivate controllers that are in conflict with the ones to activate. If any of the controllers fail to start or stop, the Behavior will return failure.
The Behavior will first call the list_controllers
service to get the list of controllers and their states. It will then create a request to the switch_controller
service with the specified controllers to activate and deactivate. The request will also include the strictness level, whether to activate controllers as soon as their hardware dependencies are ready, and a timeout for the operation.
The Behavior will wait for the service response and return success or failure based on the response.
Data Port Name | Port Type | Object Type |
activate_controllers | input | std::vector<std::string> |
deactivate_controllers | input | std::vector<std::string> |
automatic_deactivation | input | bool |
strictness | input | int |
activate_asap | input | bool |
timeout | input | std::chrono::duration<double> |
controller_list_action_name | input | std::string |
controller_switch_action_name | input | std::string |