#include <stewart.h>
Public Member Functions | |
ReturnMatrix | Find_Alpha () |
Return the angular acceleration of the platform. More... | |
ReturnMatrix | Find_C (const Real Gravity=GRAVITY) |
Return intermediate matrix C for the dynamics calculations. More... | |
ReturnMatrix | Find_ddl () |
Return the extension acceleration of the links in a vector. More... | |
ReturnMatrix | Find_dl () |
Return the extension rate of the links in a vector. More... | |
ReturnMatrix | Find_h (const Real Gravity=GRAVITY) |
Return the intermediate matrix corresponding to the Coriolis and centrifugal + gravity force/torque components. More... | |
ReturnMatrix | Find_InvJacob1 () |
Return the first intermediate jacobian matrix (reverse) of the platform. More... | |
ReturnMatrix | Find_InvJacob2 () |
Return the second intermediate jacobian matrix (reverse) of the platform. More... | |
ReturnMatrix | Find_M () |
Return the intermediate matrix corresponding to the inertia matrix of the machine. More... | |
void | Find_Mc_Nc_Gc (Matrix &Mc, Matrix &Nc, Matrix &Gc) |
Return(!) the intermediates matrix for forward dynamics with actuator dynamics. More... | |
ReturnMatrix | Find_Omega () |
Return the angular speed of the platform. More... | |
ReturnMatrix | Find_wRp () |
Return the rotation matrix wRp. More... | |
ReturnMatrix | ForwardDyn (const ColumnVector Torque, const Real Gravity=GRAVITY) |
Return the acceleration vector of the platform (ddq) More... | |
ReturnMatrix | ForwardDyn_AD (const ColumnVector Command, const Real t) |
Return the acceleration of the platform (Stewart platform mechanism dynamics including actuator dynamics) More... | |
ReturnMatrix | ForwardKine (const ColumnVector guess_q, const ColumnVector l_given, const Real tolerance=0.001) |
Return the position vector of the platform (vector q) More... | |
ReturnMatrix | get_ddq () const |
Return the acceleration of the platform. More... | |
ReturnMatrix | get_dq () const |
Return the speed of the platform. More... | |
bool | get_Joint () const |
Return the position of the universal joint (true if at base, false if at platform) More... | |
Real | get_mp () const |
Return the mass of the platform. More... | |
ReturnMatrix | get_pIp () const |
Return the inertia matrix of the platform. More... | |
ReturnMatrix | get_pR () const |
Return the postion of the center of mass of the platfom. More... | |
ReturnMatrix | get_q () const |
Return the position of the platform. More... | |
ReturnMatrix | InvPosKine () |
Return the lenght of the links in a vector. More... | |
ReturnMatrix | jacobian () |
Return the jacobian matrix of the platform. More... | |
ReturnMatrix | jacobian_dot () |
Return time deriative of the inverse jacobian matrix of the platform. More... | |
ReturnMatrix | JointSpaceForceVct (const Real Gravity=GRAVITY) |
Return a vector containing the six actuation force components. More... | |
const Stewart & | operator= (const Stewart &x) |
void | set_ddq (const ColumnVector _ddq) |
Set the platform's acceleration. More... | |
void | set_dq (const ColumnVector _dq) |
Set the platform's speed. More... | |
void | set_Joint (const bool _Joint) |
Set the position of the universal joint on the links. More... | |
void | set_mp (const Real _mp) |
Set the mass of the platform. More... | |
void | set_pIp (const Matrix _pIp) |
Set the inertia matrix of the platform. More... | |
void | set_pR (const ColumnVector _pR) |
Set the position of the center of mass of the platform. More... | |
void | set_q (const ColumnVector _q) |
Set the position of the platform. More... | |
Stewart () | |
Default Constructor. More... | |
Stewart (const Matrix InitPlat, bool Joint=true) | |
Constructor. More... | |
Stewart (const Stewart &x) | |
Copy Constructor. More... | |
Stewart (const std::string &filename, const std::string &PlatformName) | |
ReturnMatrix | Torque (const Real Gravity=GRAVITY) |
Return the torque vector of the platform. More... | |
void | Transform () |
Call the functions corresponding to the basic parameters when q changes. More... | |
~Stewart () | |
Destructor. More... | |
Public Attributes | |
ColumnVector | Alpha |
Angular speed of the platform. More... | |
ColumnVector | ddl |
Acceleration of expension vector. More... | |
ColumnVector | dl |
Rate of expension vector. More... | |
Matrix | IJ1 |
Inverse of the first intermediate Jacobian matrix. More... | |
Matrix | IJ2 |
Inverse of the second intermediate Jacobian matrix. More... | |
Matrix | Jacobian |
Jacobian matrix. More... | |
ColumnVector | Omega |
Angular acceleration of the platform. More... | |
Matrix | wRp |
Rotation matrix describing the orientation of the platform. More... | |
Private Attributes | |
Real | bm |
Viscous damping coefficient of the motor. More... | |
Real | bs |
Viscous damping coefficient of the ballscrew. More... | |
ColumnVector | ddq |
Platform acceleration. More... | |
ColumnVector | dq |
Platform speed. More... | |
ColumnVector | gravity |
Gravity vector. More... | |
Real | Jm |
Moment of inertia (motor) More... | |
Real | Js |
Moment of inertia (ballscrew) More... | |
Real | Kb |
Motor back EMF. More... | |
Real | Kt |
Motor torque. More... | |
Real | L |
Motor Inductance. More... | |
LinkStewart | Links [6] |
Platform links. More... | |
Real | mp |
Platform mass. More... | |
Real | n |
Gear ratio (links motor) More... | |
Real | p |
Pitch of the ballscrew (links) More... | |
Matrix | pIp |
Platform Inertia (local ref.) More... | |
ColumnVector | pR |
Platform center of mass (in its own referential) More... | |
ColumnVector | q |
Platform position (xyz + euler angles) More... | |
Real | R |
Motor armature resistance. More... | |
bool | UJointAtBase |
Gives the position of the universal joint (true if at base, false if at platform) More... | |
Stewart::Stewart | ( | ) |
Default Constructor.
Definition at line 819 of file stewart.cpp.
Stewart::Stewart | ( | const Matrix | InitPlatt, |
bool | Joint = true |
||
) |
Constructor.
InitPlatt | Platform initialization matrix. |
Joint | bool indicating where is the universal joint |
Definition at line 853 of file stewart.cpp.
Stewart::Stewart | ( | const Stewart & | x | ) |
Copy Constructor.
Definition at line 974 of file stewart.cpp.
Stewart::Stewart | ( | const std::string & | filename, |
const std::string & | PlatformName | ||
) |
Stewart::~Stewart | ( | ) |
Destructor.
Definition at line 999 of file stewart.cpp.
ReturnMatrix Stewart::Find_Alpha | ( | ) |
Return the angular acceleration of the platform.
Eq:
Where:
Definition at line 1261 of file stewart.cpp.
ReturnMatrix Stewart::Find_C | ( | const Real | Gravity = GRAVITY | ) |
Return intermediate matrix C for the dynamics calculations.
Eqs:
Where:
Definition at line 1512 of file stewart.cpp.
ReturnMatrix Stewart::Find_ddl | ( | ) |
Return the extension acceleration of the links in a vector.
Eq:
Where:
Definition at line 1472 of file stewart.cpp.
ReturnMatrix Stewart::Find_dl | ( | ) |
Return the extension rate of the links in a vector.
Eq:
Where:
Definition at line 1451 of file stewart.cpp.
ReturnMatrix Stewart::Find_h | ( | const Real | Gravity = GRAVITY | ) |
Return the intermediate matrix corresponding to the Coriolis and centrifugal + gravity force/torque components.
Gravity | Gravity (9.81) |
h is found by setting the ddq vector to zero and then calling the torque routine. The vector returned by Torque() is equal to h.
Definition at line 1646 of file stewart.cpp.
ReturnMatrix Stewart::Find_InvJacob1 | ( | ) |
Return the first intermediate jacobian matrix (reverse) of the platform.
Eq:
Where:
Definition at line 1316 of file stewart.cpp.
ReturnMatrix Stewart::Find_InvJacob2 | ( | ) |
Return the second intermediate jacobian matrix (reverse) of the platform.
Eq:
Where:
Definition at line 1344 of file stewart.cpp.
ReturnMatrix Stewart::Find_M | ( | ) |
Return the intermediate matrix corresponding to the inertia matrix of the machine.
M is found by setting the dq and Gravity vectors to zero and the ddq vector to zero except for the ith element that is set to one. Then, the ith row of M is equal to the matrix returned by Torque().
Definition at line 1663 of file stewart.cpp.
Return(!) the intermediates matrix for forward dynamics with actuator dynamics.
Mc | Inertia matrix of the machine |
Nc | Coriolis and centrifugal force/torque component |
Gc | Gravity force/torque component |
Eq:
Where:
Definition at line 1736 of file stewart.cpp.
ReturnMatrix Stewart::Find_Omega | ( | ) |
Return the angular speed of the platform.
Eq:
Where:
Definition at line 1223 of file stewart.cpp.
ReturnMatrix Stewart::Find_wRp | ( | ) |
Return the rotation matrix wRp.
Eq of the matrix:
Where:
Definition at line 1186 of file stewart.cpp.
ReturnMatrix Stewart::ForwardDyn | ( | const ColumnVector | T, |
const Real | Gravity = GRAVITY |
||
) |
Return the acceleration vector of the platform (ddq)
T | torque vector |
Gravity | Gravity (9.81) |
Eq:
Where:
Definition at line 1701 of file stewart.cpp.
ReturnMatrix Stewart::ForwardDyn_AD | ( | const ColumnVector | Command, |
const Real | t | ||
) |
Return the acceleration of the platform (Stewart platform mechanism dynamics including actuator dynamics)
Command | Vector of the 6 motors voltages. |
t | period of time use to find the currents (di/dt) |
Voltages with back emf:
Currents:
Motor torque:
Platform acceleration:
Where:
Definition at line 1792 of file stewart.cpp.
ReturnMatrix Stewart::ForwardKine | ( | const ColumnVector | guess_q, |
const ColumnVector | l_given, | ||
const Real | tolerance = 0.001 |
||
) |
Return the position vector of the platform (vector q)
guess_q | Approximation of real position |
l_given | Lenght of the 6 links |
tolerance | Ending criterion |
The Newton-Raphson method is used to solve the forward kinematic problem. It is a numerical iterative technic that simplify the solution. An approximation of the answer has to be guess for this method to work.
Eq:
Where:
Definition at line 1567 of file stewart.cpp.
ReturnMatrix Stewart::get_ddq | ( | ) | const |
Return the acceleration of the platform.
Definition at line 1125 of file stewart.cpp.
ReturnMatrix Stewart::get_dq | ( | ) | const |
Return the speed of the platform.
Definition at line 1119 of file stewart.cpp.
bool Stewart::get_Joint | ( | ) | const |
Return the position of the universal joint (true if at base, false if at platform)
Definition at line 1107 of file stewart.cpp.
Real Stewart::get_mp | ( | ) | const |
Return the mass of the platform.
Definition at line 1143 of file stewart.cpp.
ReturnMatrix Stewart::get_pIp | ( | ) | const |
Return the inertia matrix of the platform.
Definition at line 1137 of file stewart.cpp.
ReturnMatrix Stewart::get_pR | ( | ) | const |
Return the postion of the center of mass of the platfom.
Definition at line 1131 of file stewart.cpp.
ReturnMatrix Stewart::get_q | ( | void | ) | const |
Return the position of the platform.
Definition at line 1113 of file stewart.cpp.
ReturnMatrix Stewart::InvPosKine | ( | ) |
Return the lenght of the links in a vector.
The goal of the inverse kinematic is to find the lenght of each of the six links from the position of the platform (X,Y,Z, , , ).
Definition at line 1429 of file stewart.cpp.
ReturnMatrix Stewart::jacobian | ( | ) |
Return the jacobian matrix of the platform.
Eq:
Where:
Definition at line 1290 of file stewart.cpp.
ReturnMatrix Stewart::jacobian_dot | ( | ) |
Return time deriative of the inverse jacobian matrix of the platform.
Eq:
Where:
Definition at line 1389 of file stewart.cpp.
ReturnMatrix Stewart::JointSpaceForceVct | ( | const Real | Gravity = GRAVITY | ) |
Return a vector containing the six actuation force components.
Gravity | Gravity (9.81) |
See the description of LinkStewart::ActuationForce().
Definition at line 1595 of file stewart.cpp.
Overload = operator.
Definition at line 1004 of file stewart.cpp.
void Stewart::set_ddq | ( | const ColumnVector | _ddq | ) |
Set the platform's acceleration.
Definition at line 1066 of file stewart.cpp.
void Stewart::set_dq | ( | const ColumnVector | _dq | ) |
Set the platform's speed.
Definition at line 1048 of file stewart.cpp.
void Stewart::set_Joint | ( | const bool | _Joint | ) |
Set the position of the universal joint on the links.
Definition at line 1030 of file stewart.cpp.
void Stewart::set_mp | ( | const Real | _mp | ) |
Set the mass of the platform.
Definition at line 1101 of file stewart.cpp.
void Stewart::set_pIp | ( | const Matrix | _pIp | ) |
Set the inertia matrix of the platform.
Definition at line 1092 of file stewart.cpp.
void Stewart::set_pR | ( | const ColumnVector | _pR | ) |
Set the position of the center of mass of the platform.
Definition at line 1083 of file stewart.cpp.
void Stewart::set_q | ( | const ColumnVector | _q | ) |
Set the position of the platform.
Definition at line 1036 of file stewart.cpp.
ReturnMatrix Stewart::Torque | ( | const Real | Gravity = GRAVITY | ) |
Return the torque vector of the platform.
Gravity | Gravity (9.81) |
Eq:
Where:
Definition at line 1625 of file stewart.cpp.
void Stewart::Transform | ( | ) |
Call the functions corresponding to the basic parameters when q changes.
These functions are called by Transform:
Definition at line 1160 of file stewart.cpp.
ColumnVector Stewart::Alpha |
|
private |
|
private |
ColumnVector Stewart::ddl |
|
private |
ColumnVector Stewart::dl |
|
private |
|
private |
Matrix Stewart::IJ1 |
Matrix Stewart::IJ2 |
|
private |
ColumnVector Stewart::Omega |
|
private |
|
private |
|
private |
Matrix Stewart::wRp |