ros2_control - rolling
Loading...
Searching...
No Matches
mujoco_ros2_control
mujoco_ros2_control_plugins
include
mujoco_ros2_control_plugins
mujoco_ros2_control_plugins_base.hpp
1
// Copyright 2026 PAL Robotics S.L.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#ifndef MUJOCO_ROS2_CONTROL_PLUGINS__PLUGIN_BASE_HPP_
16
#define MUJOCO_ROS2_CONTROL_PLUGINS__PLUGIN_BASE_HPP_
17
18
#include <mujoco/mujoco.h>
19
#include <rclcpp/rclcpp.hpp>
20
21
namespace
mujoco_ros2_control_plugins
22
{
23
31
class
MuJoCoROS2ControlPluginBase
32
{
33
public
:
34
virtual
~MuJoCoROS2ControlPluginBase
() =
default
;
35
46
virtual
bool
init
(rclcpp::Node::SharedPtr node,
const
mjModel* model, mjData* data) = 0;
47
58
virtual
void
update
(
const
mjModel* model, mjData* data) = 0;
59
63
virtual
void
cleanup
() = 0;
64
};
65
66
}
// namespace mujoco_ros2_control_plugins
67
68
#endif
// MUJOCO_ROS2_CONTROL_PLUGINS__PLUGIN_BASE_HPP_
mujoco_ros2_control_plugins::MuJoCoROS2ControlPluginBase
Base class for MuJoCo ROS 2 control plugins.
Definition
mujoco_ros2_control_plugins_base.hpp:32
mujoco_ros2_control_plugins::MuJoCoROS2ControlPluginBase::update
virtual void update(const mjModel *model, mjData *data)=0
Update the plugin (called every simulation step)
mujoco_ros2_control_plugins::MuJoCoROS2ControlPluginBase::cleanup
virtual void cleanup()=0
Cleanup the plugin.
mujoco_ros2_control_plugins::MuJoCoROS2ControlPluginBase::init
virtual bool init(rclcpp::Node::SharedPtr node, const mjModel *model, mjData *data)=0
Initialize the plugin.
Generated by
1.9.8