All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ODEScrewJoint.hh
Go to the documentation of this file.
1 /*
2  * Gazebo - Outdoor Multi-Robot Simulator
3  * Copyright (C) 2003
4  * Nate Koenig
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  */
21 /* Desc: A screw or primastic joint
22  * Author: Nate Koenig, Andrew Howard
23  * Date: 21 May 2003
24  */
25 
26 #ifndef ODESCREWJOINT_HH
27 #define ODESCREWJOINT_HH
28 
29 #include "physics/ScrewJoint.hh"
30 #include "physics/ode/ODEJoint.hh"
31 
32 namespace gazebo
33 {
34  namespace physics
35  {
39 
41  class ODEScrewJoint : public ScrewJoint<ODEJoint>
42  {
44  public: ODEScrewJoint(dWorldID worldId, BasePtr _parent);
45 
47  public: virtual ~ODEScrewJoint();
48 
50  protected: virtual void Load(sdf::ElementPtr _sdf);
51 
53  public: virtual math::Vector3 GetGlobalAxis(int index) const;
54 
56  public: virtual void SetAxis(int index, const math::Vector3 &axis);
57 
59  public: virtual void SetDamping(int _index, double _damping);
60 
62  public: virtual void SetThreadPitch(int _index, double _threadPitch);
63 
65  public: void ApplyDamping();
66 
68  public: virtual math::Angle GetAngleImpl(int index) const;
69 
71  public: virtual double GetVelocity(int index) const;
72 
74  public: virtual void SetVelocity(int index, double angle);
75 
77  public: virtual void SetForce(int index, double force);
78 
80  public: virtual void SetMaxForce(int index, double t);
81 
83  public: virtual double GetMaxForce(int index);
84 
86  public: virtual double GetParam(int parameter) const;
87 
89  public: virtual void SetParam(int parameter, double value);
90  };
91 
93  }
94 }
95 #endif
96 
97 
98 
99 
100 
101