16#ifndef GAZEBO_ROS2_CONTROL__GAZEBO_SYSTEM_HPP_
17#define GAZEBO_ROS2_CONTROL__GAZEBO_SYSTEM_HPP_
23#include "angles/angles.h"
25#include "gazebo_ros2_control/gazebo_system_interface.hpp"
27#include "std_msgs/msg/bool.hpp"
29namespace gazebo_ros2_control
32class GazeboSystemPrivate;
51 CallbackReturn on_activate(
const rclcpp_lifecycle::State & previous_state)
override;
54 CallbackReturn on_deactivate(
const rclcpp_lifecycle::State & previous_state)
override;
57 hardware_interface::return_type
read()
override;
61 const std::vector<std::string> & start_interfaces,
62 const std::vector<std::string> & stop_interfaces)
override;
65 hardware_interface::return_type
write()
override;
69 rclcpp::Node::SharedPtr & model_nh,
70 gazebo::physics::ModelPtr parent_model,
72 sdf::ElementPtr sdf)
override;
77 gazebo::physics::ModelPtr parent_model);
81 gazebo::physics::ModelPtr parent_model);
84 std::unique_ptr<GazeboSystemPrivate> dataPtr;
Definition gazebo_system_interface.hpp:60
Definition gazebo_system.hpp:38
hardware_interface::return_type read() override
Read the current state values from the actuator.
Definition gazebo_system.cpp:494
hardware_interface::return_type write() override
Write the current command values to the actuator.
Definition gazebo_system.cpp:536
std::vector< hardware_interface::CommandInterface > export_command_interfaces() override
Exports all command interfaces for this hardware interface.
Definition gazebo_system.cpp:430
CallbackReturn on_init(const hardware_interface::HardwareInfo &system_info) override
Initialization of the hardware interface from data parsed from the robot's URDF.
Definition gazebo_system.cpp:415
std::vector< hardware_interface::StateInterface > export_state_interfaces() override
Exports all state interfaces for this hardware interface.
Definition gazebo_system.cpp:424
hardware_interface::return_type perform_command_mode_switch(const std::vector< std::string > &start_interfaces, const std::vector< std::string > &stop_interfaces) override
Definition gazebo_system.cpp:446
bool initSim(rclcpp::Node::SharedPtr &model_nh, gazebo::physics::ModelPtr parent_model, const hardware_interface::HardwareInfo &hardware_info, sdf::ElementPtr sdf) override
Initialize the system interface param[in] model_nh pointer to the ros2 node param[in] parent_model po...
Definition gazebo_system.cpp:109
This structure stores information about hardware defined in a robot's URDF.
Definition hardware_info.hpp:101