#include <rdUTWalking8.h>
Inheritance diagram for rdUTWalking8:

Public Member Functions | |
| rdUTWalking8 () | |
| Default constructor. | |
| virtual | ~rdUTWalking8 () |
| Destructor. | |
| virtual void | setStates (const double aY[]) |
| Set the current states. | |
| virtual void | getStates (double rY[]) const |
| Get the current states. | |
| virtual double | getState (int aIndex) const |
| Get the current value of a state by index. | |
| virtual void | setPseudoStates (const double aYP[]) |
| Set the current pseudo-states. | |
| virtual void | getPseudoStates (double rYP[]) const |
| Get the current pseudo-states. | |
| virtual double | getPseudoState (int aIndex) const |
| Get the current value of a pseudo-state by index. | |
| void | setFOM (int aMuscle, double aFOM) |
| Set the maximum isometric strength. | |
| double | getFOM (int aMuscle) const |
| Get the maximum isometric strength. | |
| void | setTRise (double aT) |
| Set the rise time of muscle activation. | |
| double | getTRise () const |
| Get the rise time of muscle activation. | |
| void | setTFall (double aT) |
| Set the fall time of muscle activation. | |
| double | getTFall () const |
| Get the fall time of muscle activation. | |
| void | setStore (bool aTrueFalse) |
| Turn on or off whether the model stores simulation data. | |
| bool | getStore () |
| Turn on or off whether the model stores simulation data. | |
| void | setDraw (bool aTrueFalse) |
| Set whether or not to draw the model. | |
| bool | getDraw () |
| Get whether or not the model is set to be drawn. | |
| virtual void | computeActuation () |
| Bring all quantities associate with actuting the model to a valid internal state. | |
| virtual void | computeMuscleForces () |
| Compute the muscle forces. | |
| virtual void | computeLigamentTorques () |
| Compute the ligament torques. | |
| virtual void | computeLigamentTorques (double *qang, double *u, double *trq) |
| Compute ligament torques. | |
| virtual void | applyActuatorForce (int aID) |
| Apply a particular actuator force to the model. | |
| virtual void | applyActuatorForces () |
| Apply all actuator forces to the model. | |
| virtual void | setActuatorForce (int aID, double aForce) |
| Set the magnitude of force experted by a particular actuator. | |
| virtual double | getActuatorForce (int aID) const |
| Get the magnitude of force experted by a particular actuator. | |
| virtual double | getActuatorSpeed (int aID) const |
| Get the speed at which a particular actuator force is applied. | |
| virtual double | getActuatorPower (int aID) const |
| Get the power delivered or absorbed by a particular actuator. | |
| void | setAllowLeftContact (bool aTrueFalse) |
| Set whether or not to allow left-foot contact forces. | |
| bool | getAllowLeftContact () const |
| Get whether or not to allow left-foot contact forces. | |
| virtual void | computeContact () |
| Compute all quantities associated with contact. | |
| virtual void | computeSpringPointKinematics (double aVel[][3], double aPos[][3]) |
| Compute spring point positions and velocities in the inertial frame. | |
| virtual void | computeGroundForces (const double aVel[][3], const double aPos[][3], double aFrc[][3]) |
| Compute ground forces given the current position and velocity of the spring points. | |
| virtual void | limitGroundForces (double aFrc[][3]) |
| Limit the horizontal ground forces so as to model friction. | |
| virtual void | updateGroundZeros (double svel[][3], double spos[][3], double sfrc[][3]) |
| Update the ground spring zeros in the horizontal plane. | |
| virtual void | setGroundZerosToCurrentPosition (double t, double *y) |
| Set ground zeros to current positions of the springs. | |
| virtual void | computeResultantBodyForces (double aFE[][3], double aFB[][6]) |
| Compute the resultant forces and moments applied by the springs to the bodies. | |
| virtual void | applyContactForce (int aID) |
| Apply a contacted force. | |
| virtual void | applyContactForces () |
| Apply the computed contacted forces. | |
| virtual int | getContactBodyA (int aID) const |
| Get the body number of BodyA for a particular contact force. | |
| virtual int | getContactBodyB (int aID) const |
| Get the body number of BodyB for a particular contact force. | |
| virtual void | setContactPointA (int aID, const double rPoint[3]) |
| Set the contact point on BodyA expressed in the local frame of BodyA for a particular contact force. | |
| virtual void | getContactPointA (int aID, double rPoint[3]) const |
| Get the contact point on BodyA expressed in the local frame of BodyA for a particular contact force. | |
| virtual void | setContactPointB (int aID, const double rPoint[3]) |
| Set the contact point on BodyB expressed in the local frame of BodyB for a particular contact force. | |
| virtual void | getContactPointB (int aID, double rPoint[3]) const |
| Get the contact point on BodyB expressed in the local frame of BodyB for a particular contact force. | |
| virtual void | getContactForce (int aID, double rForce[3]) const |
| Get the contact force acting on BodyB expressed in the local frame of BodyA for a particular contact force. | |
| virtual void | getContactStiffness (int aID, const double aDX[3], double rDF[3]) const |
| Get the instantaneous stiffness of a particular contact force expressed in the local frame of BodyA. | |
| virtual void | getContactViscosity (int aID, const double aDV[3], double rDF[3]) const |
| Get the instantaneous viscosity of a particular contact force expressed in the local frame of BodyA. | |
| virtual double | getContactForce (int aID) const |
| Get the magnitude of force experted by a particular contact force. | |
| virtual double | getContactSpeed (int aID) const |
| Get the speed at which a particular contact force is applied. | |
| virtual double | getContactPower (int aID) const |
| Get the power delivered or absorbed by a particular contact force. | |
| virtual int | deriv (double t, double *xt, double *y, double *dy) |
| Compute the derivatives of the states. | |
| virtual int | deriv (double t, double *xt, double *y, double *dqdt, double *dudt) |
| Compute the derivatives of the states. | |
| void | promoteControlsToStates (const double aX[], double aDT) |
| Promote the controls to states. | |
| int | draw (double t, double *x, double *y) |
| Draw the model. | |
| int | draw (double t, double *x, double *y, double *sfrc, double *spnt) |
| Draw the model. | |
| void | setMuson (int aMus, int aOnOff) |
| Set which muscles are drawn. | |
| virtual void | integBeginCallback (int i, double dt, double t, double *x, double *y, void *cd=NULL) |
| Take care of any initializations needed before an integration. | |
| virtual void | integStepCallback (double *xPrev, double *yPrev, int i, double dt, double t, double *x, double *y, void *cd=NULL) |
| After each integration step, update the horizontal spring zeros and draw the model. | |
Public Attributes | |
| double | _tFinal |
| double | _tcRise |
| double | _tcFall |
| double | _jdamp |
| int | _sBodies [rdUTWalking8_NS] |
| double | _sPoints [rdUTWalking8_NS][3] |
Static Public Attributes | |
| const int | NQ = rdUTWalking8_NQ |
| const int | NU = rdUTWalking8_NU |
| const int | NB = rdUTWalking8_NB |
| const int | NJ = rdUTWalking8_NJ |
| const int | NX = rdUTWalking8_NX |
| const int | NA = rdUTWalking8_NA |
| const int | NY = rdUTWalking8_NY |
| const int | NYP = rdUTWalking8_NYP |
| const int | NS = rdUTWalking8_NS |
| const int | NN = rdUTWalking8_NN |
| const int | NI = NY - (NQ+NU+NX+NX) |
| const int | IMSF = NQ+NU |
| const int | IATV = NQ+NU+NX |
| const int | IINT = NQ+NU+NX+NX |
| const int | LIGU [] = { 6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 } |
| const int | LIGJOINT [] = { 2,2,2,3,3,3,4,5,5,6,7,7,7,8,9,9,10 } |
| const int | LIGAXIS [] = { 1,2,3,1,2,3,1,1,2,1,1,2,3,1,1,2,1 } |
| const double | theta1 [] |
| const double | theta2 [] |
| const double | k0lig [] |
| const double | k1lig1 [] |
| const double | k2lig1 [] |
| const double | k1lig2 [] |
| const double | k2lig2 [] |
| const double | MU = 0.7 |
| const double | SKV = 1.0e3 |
| const double | SKP = 6.9e4 |
| const double | E0 = 6.5905e-3 |
| const double | E1 = 0.5336322 |
| const double | E2 = -1150.8002 |
| const double | G0 = 0.02 |
| const double | G1 = 10.0 |
| const double | G2 = 500.0 |
| const int | SBODY [] = { 4,4,4,4,5,8,8,8,8,9 } |
| const double | SBODYPNT [][3] |
Protected Member Functions | |
| void | initializeParameters () |
| Initialize parameters. | |
| void | initializeInitialStates () |
| Initialize the initial states. | |
| void | constructNames () |
| Construct the names of the various components of the model. | |
| void | setSpringZeros () |
| virtual void | applyMuscleForces () |
| Apply the muscle forces to the skeleton and compute actuator lengths and shortening velocities. | |
| virtual void | applyLigamentTorque (int aID=-1) |
| Apply a ligament torque. | |
Protected Attributes | |
| bool | _draw |
| Whether or not to draw the model. | |
| bool | _allowLeftContact |
| Allow the left foot to contact the ground. | |
| int | _nn |
| Number of control nodes. | |
| double * | _ynode |
| States stored at the node times. | |
| double * | _y |
| States. | |
| double * | _yp |
| Pseudo-states. | |
| double * | _tqlig |
| Ligament torques. | |
| double * | _actlen |
| Actuator lengths. | |
| double * | _actsv |
| Actuator shortening velocities. | |
| double | _spos [rdUTWalking8_NS][3] |
| Spring positions. | |
| double | _svel [rdUTWalking8_NS][3] |
| Spring velocities. | |
| double | _sfrc [rdUTWalking8_NS][3] |
| Spring forces. | |
| bool | _store |
|
|
Apply a particular actuator force to the model.
Reimplemented from rdModel. Reimplemented in suUTWalkGenFrc. |
|
|
Apply all actuator forces to the model. Actuator forces include muscle forces and ligament torques. Reimplemented from rdModel. Reimplemented in suUTWalkGenFrc. |
|
|
Apply a contacted force. For the correct contact forces to be applied correctly, computeContact() must be called prior to calling this method. Reimplemented from rdModel. |
|
|
Apply the computed contacted forces. For the correct contact forces to be applied correctly, computeContact() must be called prior to calling this method. Reimplemented from rdModel. |
|
|
Apply a ligament torque.
|
|
||||||||||||||||
|
Compute ground forces given the current position and velocity of the spring points. Note that horizontal forces are NOT limited in this method. IF friction is being modeled, limitGroundForces() and updateGroundZeros() must be called. |
|
||||||||||||
|
Compute the resultant forces and moments applied by the springs to the bodies. Note that this method requires that the configuration of the body has been set so that the inertial positions of the spring points can be computed. |
|
||||||||||||||||||||||||
|
Compute the derivatives of the states. Note that the accelerations returned by this method are in real time! Implements rdModel. Reimplemented in suUTWalkGenFrc. |
|
|
Get the magnitude of force experted by a particular actuator. For the returned information to be valid, computeActuation() must be called prior to calling this method.
Reimplemented from rdModel. Reimplemented in suUTWalkGenFrc. |
|
|
Get the power delivered or absorbed by a particular actuator. A positive power means the actuator is doing work on the model; negative power means that the actuator is absorbing energy from the model. For the returned information to be valid, computeActuation() must be called prior to calling this method.
Reimplemented from rdModel. Reimplemented in suUTWalkGenFrc. |
|
|
Get the speed at which a particular actuator force is applied. For the returned information to be valid, computeActuation() must be called prior to calling this method.
Reimplemented from rdModel. Reimplemented in suUTWalkGenFrc. |
|
|
Get whether or not to allow left-foot contact forces.
|
|
|
Get the body number of BodyA for a particular contact force. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the body number of BodyB for a particular contact force. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the magnitude of force experted by a particular contact force. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
||||||||||||
|
Get the contact force acting on BodyB expressed in the local frame of BodyA for a particular contact force. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
||||||||||||
|
Get the contact point on BodyA expressed in the local frame of BodyA for a particular contact force. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
||||||||||||
|
Get the contact point on BodyB expressed in the local frame of BodyB for a particular contact force. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the power delivered or absorbed by a particular contact force. A positive power means the contact force is doing work on the model; negative power means that the contact force is absorbing energy from the model. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the speed at which a particular contact force is applied. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
||||||||||||||||
|
Get the instantaneous stiffness of a particular contact force expressed in the local frame of BodyA. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
||||||||||||||||
|
Get the instantaneous viscosity of a particular contact force expressed in the local frame of BodyA. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the current value of a pseudo-state by index. The pseudo-states for this model are the horizontal spring zeros. The fist 10 are the spring zeros in the X direction; the second 10 are the spring zeros in the Z direction.
Reimplemented from rdModel. |
|
|
Get the current pseudo-states. The pseudo-states for this model are the horizontal spring zeros. The fist 10 are the spring zeros in the X direction; the second 10 are the spring zeros in the Z direction.
Reimplemented from rdModel. |
|
|
Get the current value of a state by index. The states are the generalized coordinates, followed by the generalized speeds, followed by the muscle forces, followed by the muscle activations, followed by other stuff.
Implements rdModel. |
|
|
Get the current states. The states are the generalized coordinates, followed by the generalized speeds, followed by the muscle forces, followed by the muscle activations, followed by other stuff.
Implements rdModel. |
|
|
Get the fall time of muscle activation.
|
|
|
Get the rise time of muscle activation.
|
|
||||||||||||
|
Promote the controls to states. This method assumes that the states of the model have been set using, for example, set() or setStates() and that computeActuation has been called. Reimplemented from rdModel. |
|
||||||||||||
|
Set the magnitude of force experted by a particular actuator.
Reimplemented from rdModel. Reimplemented in suUTWalkGenFrc. |
|
|
Set whether or not to allow left-foot contact forces.
|
|
||||||||||||
|
Set the contact point on BodyA expressed in the local frame of BodyA for a particular contact force.
Reimplemented from rdModel. |
|
||||||||||||
|
Set the contact point on BodyB expressed in the local frame of BodyB for a particular contact force.
Reimplemented from rdModel. |
|
||||||||||||
|
Set which muscles are drawn. A value of 1 is on, 0 off. |
|
|
Set the current pseudo-states. The pseudo-states for this model are the horizontal spring zeros. The fist 10 are the spring zeros in the X direction; the second 10 are the spring zeros in the Z direction.
Reimplemented from rdModel. |
|
|
Set the current states. The states are the generalized coordinates, followed by the generalized speeds, followed by the muscle forces, followed by the muscle activations, followed by other stuff.
Implements rdModel. |
|
|
Set the fall time of muscle activation.
|
|
|
Set the rise time of muscle activation.
|
|
||||||||||||||||
|
Update the ground spring zeros in the horizontal plane. The horizontal forces are not allowed to exceed MU times the vertical force, so the horizontal spring zeros are computed to be consistent with this constraint. |
|
|
Pseudo-states. These are the spring zeros. |
|
|
Initial value: {
0.1390577,0.0,0.0,
0.0,0.0,0.0,0.0,
0.49257884,0.0,-0.05,
0.0,0.0,0.0,0.0,
0.49257884,0.0,-0.05 }
|
|
|
Initial value: {
-0.35,-0.25,-0.25,
-2.44,-0.03, -0.03,-6.09,
-4.0,-60.21,-0.9,
-2.44,-0.03, -0.03,-6.09,
-4.0,-60.21,-0.9 }
|
|
|
Initial value: {
0.25,0.25,0.25,
1.51,0.03, 0.03,11.03,
1.0,60.21,0.18,
1.51,0.03, 0.03,11.03,
1.0,60.21,0.18 }
|
|
|
Initial value: {
30.72,20.36,20.36,
5.05,14.94,14.94,33.94,
8.0,16.32,14.87,
5.05,14.94,14.94,33.94,
8.0,16.32,14.87 }
|
|
|
Initial value: {
-20.36,-20.36,-20.36,
-21.88,-14.94,-14.94,-11.33,
-22.0,-16.32,-70.08,
-21.88,-14.94,-14.94,-11.33,
-22.0,-16.32,-70.08 }
|
|
|
Initial value: {
0.03,0.17,0.17,
1.81,0.50,0.92,0.13,
0.2618,0.65,0.21,
1.81,0.50,0.92,0.13,
0.2618,0.65,0.21 }
|
|
|
Initial value: {
-0.35,-0.17,-0.17,
-0.47,-0.50,-0.92,-2.40,
-0.4712,-0.65,-0.02,
-0.47,-0.50,-0.92,-2.40,
-0.4712,-0.65,-0.02 }
|
1.3