15 #ifndef ROS2_CONTROL_DEMO_EXAMPLE_7__R6BOT_HARDWARE_HPP_
16 #define ROS2_CONTROL_DEMO_EXAMPLE_7__R6BOT_HARDWARE_HPP_
19 #include "unordered_map"
22 #include "hardware_interface/handle.hpp"
23 #include "hardware_interface/hardware_info.hpp"
24 #include "hardware_interface/system_interface.hpp"
25 #include "hardware_interface/types/hardware_interface_return_values.hpp"
26 #include "hardware_interface/types/hardware_interface_type_values.hpp"
28 using hardware_interface::return_type;
30 namespace ros2_control_demo_example_7
32 using CallbackReturn = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn;
39 std::vector<hardware_interface::StateInterface> export_state_interfaces()
override;
41 std::vector<hardware_interface::CommandInterface> export_command_interfaces()
override;
43 return_type read(
const rclcpp::Time & time,
const rclcpp::Duration & period)
override;
45 return_type write(
const rclcpp::Time & ,
const rclcpp::Duration & )
override;
50 std::vector<double> joint_velocities_command_;
51 std::vector<double> joint_position_;
52 std::vector<double> joint_velocities_;
53 std::vector<double> ft_states_;
54 std::vector<double> ft_command_;
56 std::unordered_map<std::string, std::vector<std::string>> joint_interfaces = {
57 {
"position", {}}, {
"velocity", {}}};
Definition: system_interface.hpp:73
Definition: r6bot_hardware.hpp:35
std::vector< double > joint_position_command_
The size of this vector is (standard_interfaces_.size() x nr_joints)
Definition: r6bot_hardware.hpp:49
This structure stores information about hardware defined in a robot's URDF.
Definition: hardware_info.hpp:106