ros2_control - iron
Loading...
Searching...
No Matches
gz_ros2_control_plugin.hpp
1// Copyright 2021 Open Source Robotics Foundation, Inc.
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 GZ_ROS2_CONTROL__GZ_ROS2_CONTROL_PLUGIN_HPP_
16#define GZ_ROS2_CONTROL__GZ_ROS2_CONTROL_PLUGIN_HPP_
17
18#include <memory>
19
20#ifdef GZ_HEADERS
21#include <gz/sim/System.hh>
22namespace sim = gz::sim;
23#else
24#include <ignition/gazebo/System.hh>
25namespace sim = ignition::gazebo;
26#endif
27
28namespace gz_ros2_control
29{
30// Forward declarations.
31class GazeboSimROS2ControlPluginPrivate;
32
34 : public sim::System,
35 public sim::ISystemConfigure,
36 public sim::ISystemPreUpdate,
37 public sim::ISystemPostUpdate
38{
39public:
42
45
46 // Documentation inherited
47 void Configure(
48 const sim::Entity & _entity,
49 const std::shared_ptr<const sdf::Element> & _sdf,
50 sim::EntityComponentManager & _ecm,
51 sim::EventManager & _eventMgr) override;
52
53 // Documentation inherited
54 void PreUpdate(
55 const sim::UpdateInfo & _info,
56 sim::EntityComponentManager & _ecm) override;
57
58 void PostUpdate(
59 const sim::UpdateInfo & _info,
60 const sim::EntityComponentManager & _ecm) override;
61
62private:
64 std::unique_ptr<GazeboSimROS2ControlPluginPrivate> dataPtr;
65};
66} // namespace gz_ros2_control
67
68#endif // GZ_ROS2_CONTROL__GZ_ROS2_CONTROL_PLUGIN_HPP_
Definition gz_ros2_control_plugin.hpp:38
GazeboSimROS2ControlPlugin()
Constructor.
Definition gz_ros2_control_plugin.cpp:239
~GazeboSimROS2ControlPlugin() override
Destructor.
Definition gz_ros2_control_plugin.cpp:245