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