16#ifndef GZ_ROS2_CONTROL__GZ_SYSTEM_INTERFACE_HPP_
17#define GZ_ROS2_CONTROL__GZ_SYSTEM_INTERFACE_HPP_
25#include <gz/sim/System.hh>
26namespace sim = gz::sim;
28#include <ignition/gazebo/System.hh>
29namespace sim = ignition::gazebo;
32#include <hardware_interface/system_interface.hpp>
33#include <hardware_interface/types/hardware_interface_type_values.hpp>
35#include <rclcpp/rclcpp.hpp>
37namespace gz_ros2_control
57template<class ENUM, class UNDERLYING = typename std::underlying_type<ENUM>::type>
64 : mFlags(singleFlag) {}
66 : mFlags(original.mFlags) {}
68 SafeEnum & operator|=(ENUM addValue) {mFlags |= addValue;
return *
this;}
69 SafeEnum operator|(ENUM addValue) {
SafeEnum result(*
this); result |= addValue;
return result;}
70 SafeEnum & operator&=(ENUM maskValue) {mFlags &= maskValue;
return *
this;}
71 SafeEnum operator&(ENUM maskValue) {
SafeEnum result(*
this); result &= maskValue;
return result;}
72 SafeEnum operator~() {
SafeEnum result(*
this); result.mFlags = ~result.mFlags;
return result;}
73 explicit operator bool() {
return mFlags != 0;}
92 rclcpp::Node::SharedPtr & model_nh,
93 std::map<std::string, sim::Entity> & joints,
95 sim::EntityComponentManager & _ecm,
96 int & update_rate) = 0;
110 rclcpp::Node::SharedPtr nh_;
Definition gz_system_interface.hpp:82
virtual bool initSim(rclcpp::Node::SharedPtr &model_nh, std::map< std::string, sim::Entity > &joints, const hardware_interface::HardwareInfo &hardware_info, sim::EntityComponentManager &_ecm, int &update_rate)=0
Initialize the system interface param[in] model_nh Pointer to the ros2 node param[in] joints Map with...
This class allows us to handle flags easily, instead of using strings.
Definition gz_system_interface.hpp:59
Definition system_interface.hpp:73
This structure stores information about hardware defined in a robot's URDF.
Definition hardware_info.hpp:107