cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
robModifiedDH.h
Go to the documentation of this file.
1 /*
2 
3  Author(s): Simon Leonard
4  Created on: Nov 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 _robModifiedDH_h
19 #define _robModifiedDH_h
20 
21 #include <iostream>
22 
24 #include <cisstRobot/robExport.h>
25 
27 
32 
33  private:
34 
36  double alpha, a; // x components
37  double theta, d; // z components
38 
39  protected:
40 
42 
47  void ReadParameters( std::istream& is );
48 #if CISST_HAS_JSON
49  void ReadParameters(const Json::Value &config);
50 #endif
51 
53 
58  void WriteParameters( std::ostream& os ) const;
59 
60  public:
61 
63  robModifiedDH();
64 
66 
73  robModifiedDH( double alpha,
74  double a,
75  double theta,
76  double d,
77  const robJoint& joint );
78 
80  ~robModifiedDH();
81 
83 
88  vctFrame4x4<double> ForwardKinematics( double q ) const;
89 
91 
97  vctMatrixRotation3<double> Orientation( double q ) const;
98 
100 
108 
110  robKinematics* Clone() const;
111 
112  double GetRotationX() const { return alpha; }
113  double GetRotationZ() const { return theta; }
114  double GetTranslationX() const { return a; }
115  double GetTranslationZ() const { return d; }
116 
117 
118  void SetRotationX( double x ) { alpha = x; }
119  void SetRotationZ( double x ) { theta = x; }
120  void SetTranslationX( double x ) { a = x; }
121  void SetTranslationZ( double x ) { d = x; }
122 
123 };
124 
125 #endif
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
double GetRotationX() const
Definition: robModifiedDH.h:112
Modified DH (Craig's) parameters of a link.
Definition: robModifiedDH.h:31
virtual vctMatrixRotation3< double > Orientation(double q) const =0
Get the orientation of the link.
void SetRotationZ(double x)
Definition: robModifiedDH.h:119
virtual vctFixedSizeVector< double, 3 > PStar() const =0
Return the position of the next (distal) link coordinate frame.
virtual void ReadParameters(std::istream &is)=0
Read the parameters of the kinematics convention.
virtual vctFrame4x4< double > ForwardKinematics(double q) const =0
Get the position and orientation of the link.
void SetRotationX(double x)
Definition: robModifiedDH.h:118
void SetTranslationZ(double x)
Definition: robModifiedDH.h:121
virtual robKinematics * Clone() const =0
Kinematics objects must be able to clone themselves.
void SetTranslationX(double x)
Definition: robModifiedDH.h:120
Definition: robKinematics.h:18
double GetTranslationZ() const
Definition: robModifiedDH.h:115
double GetRotationZ() const
Definition: robModifiedDH.h:113
double GetTranslationX() const
Definition: robModifiedDH.h:114
Joint types.
Definition: robJoint.h:35
virtual void WriteParameters(std::ostream &os) const =0
Write the parameters of the kinematics convention.