Gazebo Sim

API Reference

8.7.0
JointMonitor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Open Source Robotics Foundation
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  */
17 
18 /*
19  * \author Nick Lamprianidis <nlamprian@gmail.com>
20  * \date January 2021
21  */
22 
23 #ifndef GZ_SIM_SYSTEMS_JOINT_MONITOR_HH_
24 #define GZ_SIM_SYSTEMS_JOINT_MONITOR_HH_
25 
26 #include <functional>
27 #include <memory>
28 
29 #include <gz/sim/System.hh>
30 
31 namespace gz
32 {
33 namespace sim
34 {
35 // Inline bracket to help doxygen filtering
36 inline namespace GZ_SIM_VERSION_NAMESPACE {
37 namespace systems
38 {
39 // Data forward declaration
40 class JointMonitorPrivate;
41 
46 {
48  public: JointMonitor();
49 
51  public: ~JointMonitor();
52 
60  public: void Configure(
61  Entity _joint, double _target, double _posEps, double _velEps,
62  const std::function<void()> &_jointTargetReachedCallback);
63 
67  public: void Update(const EntityComponentManager &_ecm);
68 
70  private: std::unique_ptr<JointMonitorPrivate> dataPtr;
71 };
72 
73 } // namespace systems
74 } // namespace GZ_SIM_VERSION_NAMESPACE
75 } // namespace sim
76 } // namespace gz
77 
78 #endif // GZ_SIM_SYSTEMS_JOINT_MONITOR_HH_