15 #ifndef PASSTHROUGH_CONTROLLER__PASSTHROUGH_CONTROLLER_HPP_
16 #define PASSTHROUGH_CONTROLLER__PASSTHROUGH_CONTROLLER_HPP_
24 #include "controller_interface/chainable_controller_interface.hpp"
25 #include "realtime_tools/realtime_buffer.hpp"
26 #include "std_msgs/msg/float64_multi_array.hpp"
28 #include "passthrough_controller_parameters.hpp"
37 using DataType = std_msgs::msg::Float64MultiArray;
41 controller_interface::CallbackReturn
on_init()
override;
47 controller_interface::CallbackReturn on_configure(
48 const rclcpp_lifecycle::State & previous_state)
override;
50 controller_interface::CallbackReturn on_activate(
51 const rclcpp_lifecycle::State & previous_state)
override;
53 controller_interface::CallbackReturn on_deactivate(
54 const rclcpp_lifecycle::State & previous_state)
override;
59 const rclcpp::Time & time,
const rclcpp::Duration & period)
override;
65 const rclcpp::Time & time,
const rclcpp::Duration & period)
override;
67 std::shared_ptr<ParamListener> param_listener_;
71 rclcpp::Subscription<DataType>::SharedPtr joints_cmd_sub_;
73 std::vector<std::string> reference_interface_names_;
75 std::vector<std::string> command_interface_names_;
Definition: chainable_controller_interface.hpp:38
Definition: passthrough_controller.hpp:39
controller_interface::return_type update_reference_from_subscribers(const rclcpp::Time &time, const rclcpp::Duration &period) override
Update reference from input topics when not in chained mode.
Definition: passthrough_controller.cpp:160
controller_interface::CallbackReturn on_init() override
Extending interface with initialization method which is individual for each controller.
Definition: passthrough_controller.cpp:22
controller_interface::return_type update_and_write_commands(const rclcpp::Time &time, const rclcpp::Duration &period) override
Execute calculations of the controller and update command interfaces.
Definition: passthrough_controller.cpp:132
controller_interface::InterfaceConfiguration state_interface_configuration() const override
Get configuration for controller's required state interfaces.
Definition: passthrough_controller.cpp:47
bool on_set_chained_mode(bool chained_mode) override
Virtual method that each chainable controller should implement to switch chained mode.
Definition: passthrough_controller.cpp:130
controller_interface::InterfaceConfiguration command_interface_configuration() const override
Get configuration for controller's required command interfaces.
Definition: passthrough_controller.cpp:38
std::vector< hardware_interface::CommandInterface > on_export_reference_interfaces() override
Definition: passthrough_controller.cpp:147
Definition: passthrough_controller.hpp:36
Configuring what command/state interfaces to claim.
Definition: controller_interface_base.hpp:58