cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
osaODEJoint.h
Go to the documentation of this file.
1 /*
2 
3  Author(s): Simon Leonard
4  Created on: November 11 2009
5 
6  (C) Copyright 2008 Johns Hopkins University (JHU), All Rights
7  Reserved.
8 
9 --- begin cisst license - do not edit ---
10 
11 This software is provided "as is" under an open source license, with
12 no warranty. The complete license can be found in license.txt and
13 http://www.cisst.org/cisst/license.txt.
14 
15 --- end cisst license ---
16 */
17 
18 #ifndef _osaODEJoint_h
19 #define _osaODEJoint_h
20 
21 #include <ode/ode.h>
22 #include <string>
23 
26 
28 
29  private:
30 
31  dJointID jointid; // joint id
32  dJointID frictionid; // motor id for friction
33 
34  double ft;
35 
36  public:
37 
39 
49  osaODEJoint( dWorldID world,
50  dBodyID body1,
51  dBodyID body2,
52  int type,
53  const vctFixedSizeVector<double,3>& anchor,
54  const vctFixedSizeVector<double,3>& axis,
55  double qmin,
56  double qmax );
57 
58  dBodyID GetProximalBody() const;
59  dBodyID GetDistalBody() const;
60 
62  dJointID JointID() const;
63 
65  dJointID FrictionID() const;
66 
68  int GetType() const { return dJointGetType( jointid ); }
69 
71 
75  double GetPosition() const;
76 
78 
82  double GetVelocity() const;
83 
85  double GetForceTorque() const;
86 
88 
92  void SetForceTorque( double ft );
93 
95 
99  void ApplyForceTorque();
100 };
101 
102 #endif
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
Definition: osaODEJoint.h:27
Declaration of vctFixedSizeVector.
int GetType() const
Return the ODE joint type.
Definition: osaODEJoint.h:68