cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
robHayati.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 _robHayati_h
19 #define _robHayati_h
20 
21 #include <iostream>
22 
24 #include <cisstRobot/robExport.h>
25 
27 
33 
34  private:
35 
37  double alpha; // rotation x
38  double beta; // rotation y
39  double theta; // rotation z
40  double d; // translation x or z (depends on joint type)
41 
42  protected:
43 
45 
51  void ReadParameters( std::istream& is );
52 #if CISST_HAS_JSON
53  void ReadParameters(const Json::Value &config);
54 #endif
55 
57 
62  void WriteParameters( std::ostream& os ) const;
63 
64  public:
65 
67  robHayati();
68 
70 
77  robHayati( double alpha,
78  double beta,
79  double theta,
80  double d,
81  const robJoint& joint );
82 
84  ~robHayati();
85 
87 
92  vctFrame4x4<double> ForwardKinematics( double q ) const;
93 
95 
101  vctMatrixRotation3<double> Orientation( double q ) const;
102 
104 
112 
114  robKinematics* Clone() const;
115 
116  double GetRotationX() const { return alpha; }
117  double GetRotationY() const { return beta; }
118  double GetRotationZ() const { return theta; }
119  double GetTranslationX() const { return d; }
120  double GetTranslationZ() const { return d; }
121 
122  void SetRotationX( double x ) { alpha = x; }
123  void SetRotationY( double x ) { beta = x; }
124  void SetRotationZ( double x ) { theta = x; }
125  void SetTranslationX( double x ) { d = x; }
126  void SetTranslationZ( double x ) { d = x; }
127 
128 };
129 
130 #endif
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
void SetRotationX(double x)
Definition: robHayati.h:122
double GetTranslationZ() const
Definition: robHayati.h:120
void SetTranslationZ(double x)
Definition: robHayati.h:126
virtual vctMatrixRotation3< double > Orientation(double q) const =0
Get the orientation of the link.
void SetTranslationX(double x)
Definition: robHayati.h:125
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.
double GetTranslationX() const
Definition: robHayati.h:119
virtual robKinematics * Clone() const =0
Kinematics objects must be able to clone themselves.
void SetRotationZ(double x)
Definition: robHayati.h:124
void SetRotationY(double x)
Definition: robHayati.h:123
double GetRotationZ() const
Definition: robHayati.h:118
Definition: robKinematics.h:18
double GetRotationY() const
Definition: robHayati.h:117
double GetRotationX() const
Definition: robHayati.h:116
Joint types.
Definition: robJoint.h:35
Hayati parameters of a coordinate frame.
Definition: robHayati.h:32
virtual void WriteParameters(std::ostream &os) const =0
Write the parameters of the kinematics convention.