15#ifndef MUJOCO_ROS2_CONTROL_PLUGINS__PLUGIN_BASE_HPP_
16#define MUJOCO_ROS2_CONTROL_PLUGINS__PLUGIN_BASE_HPP_
18#include <mujoco/mujoco.h>
19#include <rclcpp/rclcpp.hpp>
66 virtual bool init(rclcpp::Node::SharedPtr node,
const mjModel* model, mjData* data) = 0;
96#pragma GCC diagnostic push
97#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
99#pragma GCC diagnostic pop
108 [[deprecated(
"Override update_write() instead.")]]
virtual void update(
const mjModel* , mjData* )
Base class for MuJoCo ROS 2 control plugins.
Definition mujoco_ros2_control_plugins_base.hpp:52
virtual void cleanup()=0
Cleanup the plugin.
virtual void update_read(const mjModel *, mjData *)
Called once per read() cycle, on the control thread, before the state is handed to ros2_control....
Definition mujoco_ros2_control_plugins_base.hpp:80
virtual void on_reset(mjData *)
Called after a world reset (ResetWorld service or UI reset). Default does nothing.
Definition mujoco_ros2_control_plugins_base.hpp:128
virtual void update(const mjModel *, mjData *)
Same as update_write(). Default does nothing.
Definition mujoco_ros2_control_plugins_base.hpp:108
virtual void update_write(const mjModel *model, mjData *data)
Called once per write() cycle, on the control thread, after the hardware interface has staged the con...
Definition mujoco_ros2_control_plugins_base.hpp:94
virtual void pre_step(mjData *)
Called immediately before every simulation step on the physics thread. Default does nothing.
Definition mujoco_ros2_control_plugins_base.hpp:119
virtual bool init(rclcpp::Node::SharedPtr node, const mjModel *model, mjData *data)=0
Initialize the plugin.
Definition mujoco_ros2_control_plugins_base.hpp:22