15 #ifndef FORWARD_COMMAND_CONTROLLER__FORWARD_CONTROLLERS_BASE_HPP_
16 #define FORWARD_COMMAND_CONTROLLER__FORWARD_CONTROLLERS_BASE_HPP_
22 #include "controller_interface/controller_interface.hpp"
23 #include "forward_command_controller/visibility_control.h"
24 #include "rclcpp/subscription.hpp"
25 #include "rclcpp_lifecycle/state.hpp"
26 #include "realtime_tools/realtime_buffer.hpp"
27 #include "std_msgs/msg/float64_multi_array.hpp"
29 namespace forward_command_controller
31 using CmdType = std_msgs::msg::Float64MultiArray;
44 FORWARD_COMMAND_CONTROLLER_PUBLIC
47 FORWARD_COMMAND_CONTROLLER_PUBLIC
50 FORWARD_COMMAND_CONTROLLER_PUBLIC
53 FORWARD_COMMAND_CONTROLLER_PUBLIC
56 FORWARD_COMMAND_CONTROLLER_PUBLIC
57 controller_interface::CallbackReturn
on_init()
override;
59 FORWARD_COMMAND_CONTROLLER_PUBLIC
60 controller_interface::CallbackReturn on_configure(
61 const rclcpp_lifecycle::State & previous_state)
override;
63 FORWARD_COMMAND_CONTROLLER_PUBLIC
64 controller_interface::CallbackReturn on_activate(
65 const rclcpp_lifecycle::State & previous_state)
override;
67 FORWARD_COMMAND_CONTROLLER_PUBLIC
68 controller_interface::CallbackReturn on_deactivate(
69 const rclcpp_lifecycle::State & previous_state)
override;
71 FORWARD_COMMAND_CONTROLLER_PUBLIC
72 controller_interface::return_type
update(
73 const rclcpp::Time & time,
const rclcpp::Duration & period)
override;
94 std::vector<std::string> joint_names_;
95 std::string interface_name_;
97 std::vector<std::string> command_interface_types_;
100 rclcpp::Subscription<CmdType>::SharedPtr joints_command_subscriber_;
Definition: controller_interface.hpp:28
Forward command controller for a set of joints and interfaces.
Definition: forward_controllers_base.hpp:42
FORWARD_COMMAND_CONTROLLER_PUBLIC controller_interface::InterfaceConfiguration command_interface_configuration() const override
Get configuration for controller's required command interfaces.
Definition: forward_controllers_base.cpp:68
FORWARD_COMMAND_CONTROLLER_PUBLIC controller_interface::CallbackReturn on_init() override
Extending interface with initialization method which is individual for each controller.
Definition: forward_controllers_base.cpp:35
FORWARD_COMMAND_CONTROLLER_PUBLIC controller_interface::return_type update(const rclcpp::Time &time, const rclcpp::Duration &period) override
Definition: forward_controllers_base.cpp:118
FORWARD_COMMAND_CONTROLLER_PUBLIC controller_interface::InterfaceConfiguration state_interface_configuration() const override
Get configuration for controller's required state interfaces.
Definition: forward_controllers_base.cpp:77
virtual controller_interface::CallbackReturn read_parameters()=0
virtual void declare_parameters()=0
Configuring what command/state interfaces to claim.
Definition: controller_interface_base.hpp:58