15#ifndef CONTROLLER_INTERFACE__CHAINABLE_CONTROLLER_INTERFACE_HPP_
16#define CONTROLLER_INTERFACE__CHAINABLE_CONTROLLER_INTERFACE_HPP_
20#include "controller_interface/controller_interface_base.hpp"
21#include "controller_interface/visibility_control.h"
22#include "hardware_interface/handle.hpp"
24namespace controller_interface
37 CONTROLLER_INTERFACE_PUBLIC
40 CONTROLLER_INTERFACE_PUBLIC
52 CONTROLLER_INTERFACE_PUBLIC
53 return_type
update(
const rclcpp::Time & time,
const rclcpp::Duration & period)
final;
55 CONTROLLER_INTERFACE_PUBLIC
58 CONTROLLER_INTERFACE_PUBLIC
61 CONTROLLER_INTERFACE_PUBLIC
64 CONTROLLER_INTERFACE_PUBLIC
114 const rclcpp::Time & time,
const rclcpp::Duration & period) = 0;
121 bool in_chained_mode_ =
false;
Definition chainable_controller_interface.hpp:35
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.
std::vector< double > reference_interfaces_
Storage of values for reference interfaces.
Definition chainable_controller_interface.hpp:117
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:114
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:112
virtual std::vector< hardware_interface::CommandInterface > on_export_reference_interfaces()=0
virtual return_type update_reference_from_subscribers()=0
Update reference from input topics when not in chained mode.
CONTROLLER_INTERFACE_PUBLIC return_type update(const rclcpp::Time &time, const rclcpp::Duration &period) final
Definition chainable_controller_interface.cpp:28
CONTROLLER_INTERFACE_PUBLIC std::vector< hardware_interface::CommandInterface > export_reference_interfaces() final
Definition chainable_controller_interface.cpp:48
CONTROLLER_INTERFACE_PUBLIC bool set_chained_mode(bool chained_mode) final
Definition chainable_controller_interface.cpp:87
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