Class ControllerHandler
Defined in File controller_handler.hpp
Class Documentation
-
class ControllerHandler
Orchestrates the controller plugin life cycle inside the ControllerManager.
Owns the subscriptions for state and motion references, the publishers for actuator commands and debug topics, the
controller/set_control_modeservice server and the periodic control timer. The ControllerHandler does not own the plugin nor the TfHandler: both are injected by the ControllerManager.Public Functions
Construct a handler bound to a controller plugin and a node.
- Parameters:
controller – Loaded controller plugin shared with ControllerManager.
node – Controller node providing logger, parameters and IO.
tf_handler – Non-owning pointer to the TfHandler owned by ControllerManager.
-
inline virtual ~ControllerHandler()
-
rcl_interfaces::msg::SetParametersResult parametersCallback(const std::vector<rclcpp::Parameter> ¶meters)
rclcpp on_set_parameters callback applied to all parameter changes.
Forwards plugin-namespaced entries to ControllerBase::dispatchParameters and updates handler-owned state (frame ids, debug publishers).
- Parameters:
parameters – Batch of parameters being set.
- Returns:
SetParametersResult with the merged success flag.
-
void getMode(as2_msgs::msg::ControlMode &mode_in, as2_msgs::msg::ControlMode &mode_out)
Read the currently negotiated input/output control modes.
- Parameters:
mode_in – Output: latest negotiated input control mode.
mode_out – Output: latest negotiated output control mode.
-
void setInputControlModesAvailables(const std::vector<uint8_t> &available_modes)
Declare the input control modes the plugin can accept.
- Parameters:
available_modes – Bitmasks of supported input modes.
-
void setOutputControlModesAvailables(const std::vector<uint8_t> &available_modes)
Declare the output control modes the plugin can produce.
- Parameters:
available_modes – Bitmasks of supported output modes.
-
void reset()
Clear the handler-side mode and reference state.