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/node_interfaces/lifecycle_node_interface.hpp"
26#include "rclcpp_lifecycle/state.hpp"
27#include "realtime_tools/realtime_buffer.hpp"
28#include "std_msgs/msg/float64_multi_array.hpp"
30namespace forward_command_controller
32using CmdType = std_msgs::msg::Float64MultiArray;
45 FORWARD_COMMAND_CONTROLLER_PUBLIC
48 FORWARD_COMMAND_CONTROLLER_PUBLIC
51 FORWARD_COMMAND_CONTROLLER_PUBLIC
54 FORWARD_COMMAND_CONTROLLER_PUBLIC
57 FORWARD_COMMAND_CONTROLLER_PUBLIC
58 controller_interface::CallbackReturn
on_init()
override;
60 FORWARD_COMMAND_CONTROLLER_PUBLIC
61 controller_interface::CallbackReturn on_configure(
62 const rclcpp_lifecycle::State & previous_state)
override;
64 FORWARD_COMMAND_CONTROLLER_PUBLIC
65 controller_interface::CallbackReturn on_activate(
66 const rclcpp_lifecycle::State & previous_state)
override;
68 FORWARD_COMMAND_CONTROLLER_PUBLIC
69 controller_interface::CallbackReturn on_deactivate(
70 const rclcpp_lifecycle::State & previous_state)
override;
72 FORWARD_COMMAND_CONTROLLER_PUBLIC
73 controller_interface::return_type
update(
74 const rclcpp::Time & time,
const rclcpp::Duration & period)
override;
95 std::vector<std::string> joint_names_;
96 std::string interface_name_;
98 std::vector<std::string> command_interface_types_;
101 rclcpp::Subscription<CmdType>::SharedPtr joints_command_subscriber_;
Definition controller_interface.hpp:29
Forward command controller for a set of joints and interfaces.
Definition forward_controllers_base.hpp:43
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:70
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:37
FORWARD_COMMAND_CONTROLLER_PUBLIC controller_interface::return_type update(const rclcpp::Time &time, const rclcpp::Duration &period) override
Definition forward_controllers_base.cpp:120
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:79
virtual controller_interface::CallbackReturn read_parameters()=0
virtual void declare_parameters()=0
Configuring what command/state interfaces to claim.
Definition controller_interface_base.hpp:56