JointTrajectoryPlugin.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 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  * Desc: a test for setting joint angles
19  * Author: John Hsu
20  */
21 #ifndef GAZEBO_JOINT_TRAJECTORY_PLUGIN_HH
22 #define GAZEBO_JOINT_TRAJECTORY_PLUGIN_HH
23 
24 #include <boost/thread.hpp>
25 #include <boost/thread/mutex.hpp>
26 
27 #include "gazebo/physics/physics.hh"
29 #include "gazebo/common/Time.hh"
30 #include "gazebo/common/Plugin.hh"
31 #include "gazebo/common/Events.hh"
32 #include "gazebo/util/system.hh"
33 
34 namespace gazebo
35 {
37  {
39  public: JointTrajectoryPlugin();
40 
42  public: virtual ~JointTrajectoryPlugin();
43 
45  public: void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf);
46 
49  private: void UpdateStates(const common::UpdateInfo &_info);
50 
51 
52  // This function is commented out because it is not used.
53  // private: void FixLink(physics::LinkPtr link);
54 
55  // This function is commented out because it is not used.
56  // private: void UnfixLink();
57 
58  private: physics::WorldPtr world;
59  private: physics::ModelPtr model;
60  private: physics::JointPtr joint;
61 
62  private: boost::mutex update_mutex;
63 
64  // Pointer to the update event connection
65  private: event::ConnectionPtr updateConnection;
66  };
67 }
68 #endif
Definition: JointTrajectoryPlugin.hh:36
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:89
Forward declarations for transport.
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:117
Information for use in an update event.
Definition: UpdateInfo.hh:30
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:153
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:93
A plugin with access to physics::Model.
Definition: Plugin.hh:245
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59