|
1 |
| -/* |
2 |
| - * Copyright 2023 Open Source Robotics Foundation, Inc. |
3 |
| - * |
4 |
| - * Licensed under the Apache License, Version 2.0 (the "License"); |
5 |
| - * you may not use this file except in compliance with the License. |
6 |
| - * You may obtain a copy of the License at |
7 |
| - * |
8 |
| - * http://www.apache.org/licenses/LICENSE-2.0 |
9 |
| - * |
10 |
| - * Unless required by applicable law or agreed to in writing, software |
11 |
| - * distributed under the License is distributed on an "AS IS" BASIS, |
12 |
| - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 |
| - * See the License for the specific language governing permissions and |
14 |
| - * limitations under the License. |
15 |
| - * |
16 |
| -*/ |
| 1 | +// Copyright 2023 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. |
17 | 14 |
|
18 | 15 | //----------------------------------------------------------------------
|
19 | 16 | /*!\file
|
|
24 | 21 | */
|
25 | 22 | //----------------------------------------------------------------------
|
26 | 23 |
|
27 |
| -#ifndef IGNITION_GAZEBO_SYSTEMS_MIMICJOINTSYSTEM_HH_ |
28 |
| -#define IGNITION_GAZEBO_SYSTEMS_MIMICJOINTSYSTEM_HH_ |
| 24 | +#ifndef IGN_ROS2_CONTROL__MIMICJOINTSYSTEM_HH_ |
| 25 | +#define IGN_ROS2_CONTROL__MIMICJOINTSYSTEM_HH_ |
29 | 26 |
|
30 | 27 | //! [header]
|
31 | 28 | #include <memory>
|
@@ -57,37 +54,49 @@ namespace ign_ros2_control
|
57 | 54 | class MimicJointSystemPrivate;
|
58 | 55 |
|
59 | 56 | class MimicJointSystem:
|
60 |
| - // This class is a system. |
61 |
| - public ignition::gazebo::System, |
62 |
| - public ignition::gazebo::ISystemConfigure, |
63 |
| - // This class also implements the ISystemPreUpdate, ISystemUpdate, |
64 |
| - // and ISystemPostUpdate interfaces. |
65 |
| - public ignition::gazebo::ISystemPreUpdate, |
66 |
| - public ignition::gazebo::ISystemUpdate, |
67 |
| - public ignition::gazebo::ISystemPostUpdate |
| 57 | + // This class is a system. |
| 58 | + public ignition::gazebo::System, |
| 59 | + public ignition::gazebo::ISystemConfigure, |
| 60 | + // This class also implements the ISystemPreUpdate, ISystemUpdate, |
| 61 | + // and ISystemPostUpdate interfaces. |
| 62 | + public ignition::gazebo::ISystemPreUpdate, |
| 63 | + public ignition::gazebo::ISystemUpdate, |
| 64 | + public ignition::gazebo::ISystemPostUpdate |
68 | 65 | {
|
69 |
| - public: MimicJointSystem(); |
| 66 | +public: |
| 67 | + MimicJointSystem(); |
70 | 68 |
|
71 | 69 | // Documentation inherited
|
72 |
| - public: void Configure(const ignition::gazebo::Entity &_entity, |
73 |
| - const std::shared_ptr<const sdf::Element> &_sdf, |
74 |
| - ignition::gazebo::EntityComponentManager &_ecm, |
75 |
| - ignition::gazebo::EventManager &_eventMgr) override; |
76 | 70 |
|
77 |
| - public: void PreUpdate(const ignition::gazebo::UpdateInfo &_info, |
78 |
| - ignition::gazebo::EntityComponentManager &_ecm) override; |
| 71 | +public: |
| 72 | + void Configure( |
| 73 | + const ignition::gazebo::Entity & _entity, |
| 74 | + const std::shared_ptr < const sdf::Element > & _sdf, |
| 75 | + ignition::gazebo::EntityComponentManager & _ecm, |
| 76 | + ignition::gazebo::EventManager & _eventMgr) override; |
| 77 | + |
| 78 | +public: |
| 79 | + void PreUpdate( |
| 80 | + const ignition::gazebo::UpdateInfo & _info, |
| 81 | + ignition::gazebo::EntityComponentManager & _ecgm) override; |
| 82 | + |
| 83 | +public: |
| 84 | + void Update( |
| 85 | + const ignition::gazebo::UpdateInfo & _info, |
| 86 | + ignition::gazebo::EntityComponentManager & _ecm) override; |
79 | 87 |
|
80 |
| - public: void Update(const ignition::gazebo::UpdateInfo &_info, |
81 |
| - ignition::gazebo::EntityComponentManager &_ecm) override; |
| 88 | +public: |
| 89 | + void PostUpdate( |
| 90 | + const ignition::gazebo::UpdateInfo & _info, |
| 91 | + const ignition::gazebo::EntityComponentManager & _ecm) override; |
82 | 92 |
|
83 |
| - public: void PostUpdate(const ignition::gazebo::UpdateInfo &_info, |
84 |
| - const ignition::gazebo::EntityComponentManager &_ecm) override; |
| 93 | +private: |
| 94 | + /// \brief Private data pointer |
85 | 95 |
|
86 |
| - private: |
87 |
| - /// \brief Private data pointer |
88 |
| - private: std::unique_ptr<MimicJointSystemPrivate> dataPtr; |
| 96 | +private: |
| 97 | + std::unique_ptr < MimicJointSystemPrivate > dataPtr; |
89 | 98 | };
|
90 |
| -} |
| 99 | +} // namespace ign_ros2_control |
91 | 100 | //! [header]
|
92 | 101 |
|
93 |
| -#endif |
| 102 | +#endif // IGN_ROS2_CONTROL__MIMICJOINTSYSTEM_HH_ |
0 commit comments