cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
robDH.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 2009 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 _robDH_h
19 #define _robDH_h
20 
21 #include <iostream>
22 
24 #include <cisstRobot/robExport.h>
25 
27 
31 
32  private:
33 
35  double alpha;
36  double a; // x components
37  double theta;
38  double d; // z components
39 
40  protected:
41 
43 
48  void ReadParameters( std::istream& is );
49 #if CISST_HAS_JSON
50  void ReadParameters(const Json::Value &config);
51 #endif
52 
54 
59  void WriteParameters( std::ostream& os ) const;
60 
61  public:
62 
64  robDH();
65 
67 
74  robDH( double alpha,
75  double a,
76  double theta,
77  double d,
78  const robJoint& joint );
79 
81  ~robDH();
82 
84 
89  vctFrame4x4<double> ForwardKinematics( double q ) const;
90 
92 
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  void SetRotationX( double x ) { alpha = x; }
118  void SetRotationZ( double x ) { theta = x; }
119  void SetTranslationX( double x ) { a = x; }
120  void SetTranslationZ( double x ) { d = x; }
121 
122 };
123 
124 #endif
double GetRotationZ() const
Definition: robDH.h:113
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
void SetTranslationX(double x)
Definition: robDH.h:119
virtual vctMatrixRotation3< double > Orientation(double q) const =0
Get the orientation of the link.
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 SetRotationZ(double x)
Definition: robDH.h:118
virtual robKinematics * Clone() const =0
Kinematics objects must be able to clone themselves.
double GetTranslationX() const
Definition: robDH.h:114
void SetTranslationZ(double x)
Definition: robDH.h:120
Definition: robKinematics.h:18
void SetRotationX(double x)
Definition: robDH.h:117
double GetTranslationZ() const
Definition: robDH.h:115
Joint types.
Definition: robJoint.h:35
virtual void WriteParameters(std::ostream &os) const =0
Write the parameters of the kinematics convention.
double GetRotationX() const
Definition: robDH.h:112
Standard DH parameters of a coordinate frame.
Definition: robDH.h:30