16 #ifndef GAZEBO_ROS2_CONTROL__GAZEBO_SYSTEM_INTERFACE_HPP_
17 #define GAZEBO_ROS2_CONTROL__GAZEBO_SYSTEM_INTERFACE_HPP_
23 #include "gazebo/physics/Joint.hh"
24 #include "gazebo/physics/Model.hh"
25 #include "gazebo/physics/physics.hh"
27 #include "hardware_interface/system_interface.hpp"
29 #include "rclcpp/rclcpp.hpp"
32 namespace gazebo_ros2_control
35 template<class ENUM, class UNDERLYING = typename std::underlying_type<ENUM>::type>
42 : mFlags(singleFlag) {}
44 : mFlags(original.mFlags) {}
48 SafeEnum & operator|=(ENUM addValue) {mFlags |= addValue;
return *
this;}
49 SafeEnum operator|(ENUM addValue) {
SafeEnum result(*
this); result |= addValue;
return result;}
50 SafeEnum & operator&=(ENUM maskValue) {mFlags &= maskValue;
return *
this;}
51 SafeEnum operator&(ENUM maskValue) {
SafeEnum result(*
this); result &= maskValue;
return result;}
52 SafeEnum operator~() {
SafeEnum result(*
this); result.mFlags = ~result.mFlags;
return result;}
53 explicit operator bool() {
return mFlags != 0;}
70 rclcpp::Node::SharedPtr & model_nh,
71 gazebo::physics::ModelPtr parent_model,
73 sdf::ElementPtr sdf) = 0;
82 VELOCITY_PID = (1 << 3),
83 POSITION_PID = (1 << 4),
89 rclcpp::Node::SharedPtr nh_;
Definition: gazebo_system_interface.hpp:62
virtual bool initSim(rclcpp::Node::SharedPtr &model_nh, gazebo::physics::ModelPtr parent_model, const hardware_interface::HardwareInfo &hardware_info, sdf::ElementPtr sdf)=0
Initialize the system interface param[in] model_nh pointer to the ros2 node param[in] parent_model po...
Definition: gazebo_system_interface.hpp:37
Definition: system_interface.hpp:83
This structure stores information about hardware defined in a robot's URDF.
Definition: hardware_info.hpp:170