15 #ifndef CONTROLLER_INTERFACE__CHAINABLE_CONTROLLER_INTERFACE_HPP_
16 #define CONTROLLER_INTERFACE__CHAINABLE_CONTROLLER_INTERFACE_HPP_
21 #include "controller_interface/controller_interface_base.hpp"
22 #include "controller_interface/visibility_control.h"
23 #include "hardware_interface/handle.hpp"
25 namespace controller_interface
38 CONTROLLER_INTERFACE_PUBLIC
41 CONTROLLER_INTERFACE_PUBLIC
53 CONTROLLER_INTERFACE_PUBLIC
54 return_type
update(
const rclcpp::Time & time,
const rclcpp::Duration & period)
final;
56 CONTROLLER_INTERFACE_PUBLIC
59 CONTROLLER_INTERFACE_PUBLIC
62 CONTROLLER_INTERFACE_PUBLIC
65 CONTROLLER_INTERFACE_PUBLIC
68 CONTROLLER_INTERFACE_PUBLIC
116 const rclcpp::Time & time,
const rclcpp::Duration & period) = 0;
130 const rclcpp::Time & time,
const rclcpp::Duration & period) = 0;
134 std::vector<double> state_interfaces_values_;
138 std::vector<double> reference_interfaces_;
142 bool in_chained_mode_ =
false;
Definition: chainable_controller_interface.hpp:36
virtual return_type update_and_write_commands(const rclcpp::Time &time, const rclcpp::Duration &period)=0
Execute calculations of the controller and update command interfaces.
virtual return_type update_reference_from_subscribers(const rclcpp::Time &time, const rclcpp::Duration &period)=0
Update reference from input topics when not in chained mode.
virtual std::vector< hardware_interface::CommandInterface > on_export_reference_interfaces()
Definition: chainable_controller_interface.cpp:140
std::vector< std::string > exported_reference_interface_names_
Storage of values for reference interfaces.
Definition: chainable_controller_interface.hpp:137
virtual bool on_set_chained_mode(bool chained_mode)
Virtual method that each chainable controller should implement to switch chained mode.
Definition: chainable_controller_interface.cpp:124
CONTROLLER_INTERFACE_PUBLIC bool is_in_chained_mode() const final
Get information if a controller is currently in chained mode.
Definition: chainable_controller_interface.cpp:122
CONTROLLER_INTERFACE_PUBLIC std::vector< hardware_interface::StateInterface > export_state_interfaces() final
Definition: chainable_controller_interface.cpp:48
CONTROLLER_INTERFACE_PUBLIC return_type update(const rclcpp::Time &time, const rclcpp::Duration &period) final
Definition: chainable_controller_interface.cpp:28
virtual std::vector< hardware_interface::StateInterface > on_export_state_interfaces()
Definition: chainable_controller_interface.cpp:127
CONTROLLER_INTERFACE_PUBLIC std::vector< hardware_interface::CommandInterface > export_reference_interfaces() final
Definition: chainable_controller_interface.cpp:72
std::vector< std::string > exported_state_interface_names_
Storage of values for state interfaces.
Definition: chainable_controller_interface.hpp:133
CONTROLLER_INTERFACE_PUBLIC bool set_chained_mode(bool chained_mode) final
Definition: chainable_controller_interface.cpp:96
CONTROLLER_INTERFACE_PUBLIC bool is_chainable() const final
Get information if a controller is chainable.
Definition: chainable_controller_interface.cpp:26
Definition: controller_interface_base.hpp:67