DHTransform Class Reference
Converts 4 parameter Denavit-Hartenberg notation to a 4x4 transform.
More...
#include <joint.h>
List of all members.
Public Member Functions |
| DHTransform (const DHTransform *d) |
| DHTransform (double thval=0.0, double dval=0.0, double aval=0.0, double alval=0.0) |
double | getA () const |
double | getD () const |
double | getTheta () const |
transf | getTran (double thetaVal, double dVal) const |
const transf & | getTran () const |
void | setA (double q) |
void | setD (double q) |
void | setTheta (double q) |
Private Member Functions |
void | computeTran () |
| Re-computes the transform from scratch based on theta, d, a and alpha.
|
Private Attributes |
double | a |
| Translation along x-axis in mm.
|
double | alpha |
| Rotation about x-axis in radians.
|
vec3 | atrans |
| Translation vector along the x-axis.
|
double | d |
| Translation along z-axis in mm.
|
vec3 | dtrans |
| Translation vector along the z-axis.
|
double | theta |
| Rotation about z-axis in radians.
|
transf | tr1 |
| Rotation transform of theta about z-axis.
|
transf | tr2 |
| Translation transform of d along z-axis.
|
transf | tr4TimesTr3 |
| Precomputed value of transform 4 times transform 3.
|
transf | tran |
| Final transform.
|
Detailed Description
Converts 4 parameter Denavit-Hartenberg notation to a 4x4 transform.
Stores the 4 Denavit-Hartenberg parameters that define a transform between the joints of a robot. Each joint has its axis aligned with the z-axis of the joint frame. The four values are theta, d, a, and alpha. Theta is the rotation about the z-axis of the current joint frame (this value is variable for revolute joints). D is the translation along the z-axis of the joint frame (this value is variable for prismatic joints). A is the transaltion along the x-axis of the joint frame, and alpha is the rotation about the x-axis.
Definition at line 58 of file joint.h.
Constructor & Destructor Documentation
DHTransform::DHTransform |
( |
double |
thval = 0.0 , |
|
|
double |
dval = 0.0 , |
|
|
double |
aval = 0.0 , |
|
|
double |
alval = 0.0 | |
|
) |
| | |
DHTransform::DHTransform |
( |
const DHTransform * |
d |
) |
[inline] |
Member Function Documentation
void DHTransform::computeTran |
( |
|
) |
[private] |
Re-computes the transform from scratch based on theta, d, a and alpha.
Definition at line 68 of file joint.cpp.
double DHTransform::getA |
( |
|
) |
const [inline] |
Returns the current a value.
Definition at line 107 of file joint.h.
double DHTransform::getD |
( |
|
) |
const [inline] |
Returns the current d value.
Definition at line 101 of file joint.h.
double DHTransform::getTheta |
( |
|
) |
const [inline] |
Returns the current theta value.
Definition at line 104 of file joint.h.
transf DHTransform::getTran |
( |
double |
thetaVal, |
|
|
double |
dVal | |
|
) |
| | const [inline] |
Returns the value of this transform if thetaVal is substituted for theta and dval is substituted for d. It does not change any values within the DHTransform.
Definition at line 126 of file joint.h.
const transf& DHTransform::getTran |
( |
|
) |
const [inline] |
Returns the current value of this transform.
Definition at line 119 of file joint.h.
void DHTransform::setA |
( |
double |
q |
) |
[inline] |
Sets the a value and re-computes the transform (from scratch).
Definition at line 116 of file joint.h.
void DHTransform::setD |
( |
double |
q |
) |
|
Sets the d value.
Sets a new d value for prismatic joints and recomputes the current value of the transform.
Definition at line 93 of file joint.cpp.
void DHTransform::setTheta |
( |
double |
q |
) |
|
Sets the theta value.
Sets a new theta value for revolute joints and recomputes the current value of the transform.
Definition at line 106 of file joint.cpp.
Member Data Documentation
Translation along x-axis in mm.
Definition at line 85 of file joint.h.
Rotation about x-axis in radians.
Definition at line 88 of file joint.h.
Translation vector along the x-axis.
Definition at line 64 of file joint.h.
Translation along z-axis in mm.
Definition at line 82 of file joint.h.
Translation vector along the z-axis.
Definition at line 61 of file joint.h.
Rotation about z-axis in radians.
Definition at line 79 of file joint.h.
Rotation transform of theta about z-axis.
Definition at line 73 of file joint.h.
Translation transform of d along z-axis.
Definition at line 70 of file joint.h.
Precomputed value of transform 4 times transform 3.
Definition at line 67 of file joint.h.
Final transform.
Definition at line 76 of file joint.h.
The documentation for this class was generated from the following files: