SpringPlugin.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 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 #ifndef __GAZEBO_SPRING_TEST_PLUGIN_HH__
18 #define __GAZEBO_SPRING_TEST_PLUGIN_HH__
19 
20 #include <string>
21 #pragma GCC diagnostic push
22 #pragma GCC system_header
23 
24 #include "gazebo/common/Plugin.hh"
25 #include "gazebo/physics/physics.hh"
26 #include "gazebo/util/system.hh"
27 #include <ros/ros.h>
28 
29 #pragma GCC diagnostic pop
30 
31 namespace gazebo
32 {
33 class GAZEBO_VISIBLE SpringPlugin : public ModelPlugin
34 {
35 public: SpringPlugin();
36 public: virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
37 public: virtual void Init();
38 
39 private: void ExplicitUpdate();
40 
41 private: event::ConnectionPtr updateConnection_;
42 
43 private: physics::ModelPtr model_;
44 
45 private: common::Time prevUpdateTime_;
46 
47 private: physics::JointPtr jointExplicit_;
48 private: std::string jointExplicitName_;
49 
51 private: double kpExplicit_;
52 
54 private: double kdExplicit_;
55 
57 private: int axisExplicit_;
58 };
59 }
60 #endif
Definition: SpringPlugin.hh:31
Definition: SpringPlugin.hh:33