17#ifndef ROS2_CONTROL_DEMO_EXAMPLE_18__DUCK_MINI_MUJOCO_SYSTEM_INTERFACE_HPP_
18#define ROS2_CONTROL_DEMO_EXAMPLE_18__DUCK_MINI_MUJOCO_SYSTEM_INTERFACE_HPP_
20#include <mujoco/mujoco.h>
27#include <hardware_interface/hardware_info.hpp>
28#include <hardware_interface/types/hardware_interface_return_values.hpp>
29#include <mujoco_ros2_control/mujoco_system_interface.hpp>
31namespace ros2_control_demo_example_18
37 double contact_raw_value{0.0};
41 hardware_interface::StateInterface::SharedPtr contact_raw_interface;
43 std::string body1_name;
44 std::string body2_name;
55 hardware_interface::CallbackReturn
62 hardware_interface::return_type
read(
63 const rclcpp::Time & time,
const rclcpp::Duration & period)
override;
66 void register_contact_detection();
67 void update_contact_detection();
68 std::vector<ContactDetectionData> contact_detection_data_;
70 mjModel * contact_model_{
nullptr};
71 mjData * contact_data_{
nullptr};
Definition mujoco_system_interface.hpp:82
Definition duck_mini_mujoco_system_interface.hpp:50
std::vector< hardware_interface::StateInterface::ConstSharedPtr > on_export_state_interfaces() override
Definition duck_mini_mujoco_system_interface.cpp:113
hardware_interface::CallbackReturn on_init(const hardware_interface::HardwareComponentInterfaceParams ¶ms) override
Initialization of the hardware interface from data parsed from the robot's URDF.
Definition duck_mini_mujoco_system_interface.cpp:36
hardware_interface::return_type read(const rclcpp::Time &time, const rclcpp::Duration &period) override
Read the current state values from the hardware.
Definition duck_mini_mujoco_system_interface.cpp:127
Parameters required for the initialization of a specific hardware component plugin....
Definition hardware_component_interface_params.hpp:32