#include <stewart.h>
Public Member Functions | |
ReturnMatrix | Find_Alpha () |
Return the angular acceleration of the platform. | |
ReturnMatrix | Find_C (const Real Gravity=GRAVITY) |
Return intermediate matrix C for the dynamics calculations. | |
ReturnMatrix | Find_ddl () |
Return the extension acceleration of the links in a vector. | |
ReturnMatrix | Find_dl () |
Return the extension rate of the links in a vector. | |
ReturnMatrix | Find_h (const Real Gravity=GRAVITY) |
Return the intermediate matrix corresponding to the Coriolis and centrifugal + gravity force/torque components. | |
ReturnMatrix | Find_InvJacob1 () |
Return the first intermediate jacobian matrix (reverse) of the platform. | |
ReturnMatrix | Find_InvJacob2 () |
Return the second intermediate jacobian matrix (reverse) of the platform. | |
ReturnMatrix | Find_M () |
Return the intermediate matrix corresponding to the inertia matrix of the machine. | |
void | Find_Mc_Nc_Gc (Matrix &Mc, Matrix &Nc, Matrix &Gc) |
Return(!) the intermediates matrix for forward dynamics with actuator dynamics. | |
ReturnMatrix | Find_Omega () |
Return the angular speed of the platform. | |
ReturnMatrix | Find_wRp () |
Return the rotation matrix wRp. | |
ReturnMatrix | ForwardDyn (const ColumnVector Torque, const Real Gravity=GRAVITY) |
Return the acceleration vector of the platform (ddq) | |
ReturnMatrix | ForwardDyn_AD (const ColumnVector Command, const Real t) |
Return the acceleration of the platform (Stewart platform mechanism dynamics including actuator dynamics) | |
ReturnMatrix | ForwardKine (const ColumnVector guess_q, const ColumnVector l_given, const Real tolerance=0.001) |
Return the position vector of the platform (vector q) | |
ReturnMatrix | get_ddq () const |
Return the acceleration of the platform. | |
ReturnMatrix | get_dq () const |
Return the speed of the platform. | |
bool | get_Joint () const |
Return the position of the universal joint (true if at base, false if at platform) | |
Real | get_mp () const |
Return the mass of the platform. | |
ReturnMatrix | get_pIp () const |
Return the inertia matrix of the platform. | |
ReturnMatrix | get_pR () const |
Return the postion of the center of mass of the platfom. | |
ReturnMatrix | get_q () const |
Return the position of the platform. | |
ReturnMatrix | InvPosKine () |
Return the lenght of the links in a vector. | |
ReturnMatrix | jacobian () |
Return the jacobian matrix of the platform. | |
ReturnMatrix | jacobian_dot () |
Return time deriative of the inverse jacobian matrix of the platform. | |
ReturnMatrix | JointSpaceForceVct (const Real Gravity=GRAVITY) |
Return a vector containing the six actuation force components. | |
const Stewart & | operator= (const Stewart &x) |
void | set_ddq (const ColumnVector _ddq) |
Set the platform's acceleration. | |
void | set_dq (const ColumnVector _dq) |
Set the platform's speed. | |
void | set_Joint (const bool _Joint) |
Set the position of the universal joint on the links. | |
void | set_mp (const Real _mp) |
Set the mass of the platform. | |
void | set_pIp (const Matrix _pIp) |
Set the inertia matrix of the platform. | |
void | set_pR (const ColumnVector _pR) |
Set the position of the center of mass of the platform. | |
void | set_q (const ColumnVector _q) |
Set the position of the platform. | |
Stewart () | |
Default Constructor. | |
Stewart (const Matrix InitPlat, bool Joint=true) | |
Constructor. | |
Stewart (const Stewart &x) | |
Copy Constructor. | |
Stewart (const std::string &filename, const std::string &PlatformName) | |
ReturnMatrix | Torque (const Real Gravity=GRAVITY) |
Return the torque vector of the platform. | |
void | Transform () |
Call the functions corresponding to the basic parameters when q changes. | |
~Stewart () | |
Destructor. | |
Public Attributes | |
ColumnVector | Alpha |
Angular speed of the platform. | |
ColumnVector | ddl |
Acceleration of expension vector. | |
ColumnVector | dl |
Rate of expension vector. | |
Matrix | IJ1 |
Inverse of the first intermediate Jacobian matrix. | |
Matrix | IJ2 |
Inverse of the second intermediate Jacobian matrix. | |
Matrix | Jacobian |
Jacobian matrix. | |
ColumnVector | Omega |
Angular acceleration of the platform. | |
Matrix | wRp |
Rotation matrix describing the orientation of the platform. | |
Private Attributes | |
Real | bm |
Viscous damping coefficient of the motor. | |
Real | bs |
Viscous damping coefficient of the ballscrew. | |
ColumnVector | ddq |
Platform acceleration. | |
ColumnVector | dq |
Platform speed. | |
ColumnVector | gravity |
Gravity vector. | |
Real | Jm |
Moment of inertia (motor) | |
Real | Js |
Moment of inertia (ballscrew) | |
Real | Kb |
Motor back EMF. | |
Real | Kt |
Motor torque. | |
Real | L |
Motor Inductance. | |
LinkStewart | Links [6] |
Platform links. | |
Real | mp |
Platform mass. | |
Real | n |
Gear ratio (links motor) | |
Real | p |
Pitch of the ballscrew (links) | |
Matrix | pIp |
Platform Inertia (local ref.) | |
ColumnVector | pR |
Platform center of mass (in its own referential) | |
ColumnVector | q |
Platform position (xyz + euler angles) | |
Real | R |
Motor armature resistance. | |
bool | UJointAtBase |
Gives the position of the universal joint (true if at base, false if at platform) |
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 | ||
) |
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.
void Stewart::Find_Mc_Nc_Gc | ( | Matrix & | Mc, |
Matrix & | Nc, | ||
Matrix & | Gc | ||
) |
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 |
Real Stewart::bm [private] |
Real Stewart::bs [private] |
ColumnVector Stewart::ddl |
ColumnVector Stewart::ddq [private] |
ColumnVector Stewart::dl |
ColumnVector Stewart::dq [private] |
ColumnVector Stewart::gravity [private] |
Matrix Stewart::IJ1 |
Matrix Stewart::IJ2 |
Matrix Stewart::Jacobian |
Real Stewart::Jm [private] |
Real Stewart::Js [private] |
Real Stewart::Kb [private] |
Real Stewart::Kt [private] |
Real Stewart::L [private] |
LinkStewart Stewart::Links[6] [private] |
Real Stewart::mp [private] |
Real Stewart::n [private] |
ColumnVector Stewart::Omega |
Real Stewart::p [private] |
Matrix Stewart::pIp [private] |
ColumnVector Stewart::pR [private] |
ColumnVector Stewart::q [private] |
Real Stewart::R [private] |
bool Stewart::UJointAtBase [private] |
Matrix Stewart::wRp |