|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.yobotics.simulationconstructionset.Joint
com.yobotics.simulationconstructionset.FreeJoint
public class FreeJoint
Title: Yobotics! Simulation Construction Set
Description: Package for Simulating Dynamic Robots and Mechanisms
Copyright: Copyright (c) Jerry Pratt
Company: Yobotics, Inc.
Field Summary |
---|
Fields inherited from class com.yobotics.simulationconstructionset.Joint |
---|
MAX_ROT_ACCEL, MAX_TRANS_ACCEL |
Constructor Summary | |
---|---|
FreeJoint(java.lang.String jname,
javax.vecmath.Vector3d offset,
Robot rob,
java.lang.String xName,
java.lang.String yName,
java.lang.String zName,
java.lang.String yawName,
java.lang.String rollName,
java.lang.String pitchName)
|
Method Summary | |
---|---|
void |
jointDependentFeatherstonePassFour(double Q,
int passNumber)
The fourth and final featherstone pass travels back down the tree calculating joint accelerations based on the data gathered by the preceding three passes. |
void |
jointDependentFeatherstonePassOne()
The first featherstone pass handles velocity and position updates as it recurses down the tree. |
void |
jointDependentFeatherstonePassTwo(javax.vecmath.Vector3d w_h)
The primary function of the second featherstone pass is the calculation of the spatial articulated inertia and spatial articulated zero-acceleration force of link i. |
void |
jointDependentRecordK(int passNumber)
If a joint is specified as non dynamic the second and third featherstone passes are skipped when dynamics are calculated. |
void |
jointDependentSetAndGetRotation(javax.vecmath.Matrix3d Rh_i)
Calculates the rotation matrix between the previous and current joint space. |
void |
recursiveEulerIntegrate(double stepSize)
Recurses over the children and performes a Euler Integration on the position and velocity parameters of each. |
void |
recursiveRestoreTempState()
Restores the previous state for the relevant joint variables for use in the next Euler Integration. |
void |
recursiveRungeKuttaSum(double stepSize)
This function recurses through the children of this joint calculating new values for the relevant variables using the RK4 method. |
void |
recursiveSaveTempState()
Saves the current state of each joint. |
void |
setFreeTransform3D(javax.media.j3d.Transform3D tTranslate)
|
void |
setFreeTransform3D(javax.media.j3d.Transform3D tTranslate,
double x,
double y,
double z,
double yaw,
double roll,
double pitch)
|
void |
update()
Update the state of this joint, each implementation handles this differently. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FreeJoint(java.lang.String jname, javax.vecmath.Vector3d offset, Robot rob, java.lang.String xName, java.lang.String yName, java.lang.String zName, java.lang.String yawName, java.lang.String rollName, java.lang.String pitchName)
Method Detail |
---|
public void update()
Joint
public void setFreeTransform3D(javax.media.j3d.Transform3D tTranslate)
public void setFreeTransform3D(javax.media.j3d.Transform3D tTranslate, double x, double y, double z, double yaw, double roll, double pitch)
public void jointDependentSetAndGetRotation(javax.vecmath.Matrix3d Rh_i)
Joint
Rh_i
- Matrix3d in which the rotation between from the previous joint space to the current will be stored.public void jointDependentFeatherstonePassOne()
Joint
public void jointDependentFeatherstonePassTwo(javax.vecmath.Vector3d w_h)
Joint
w_h
- The angular velocity of the previous link in this links coordinate system. This value is necessary for the
calculation of coriolis forces.public void jointDependentFeatherstonePassFour(double Q, int passNumber)
Joint
Q
- Joint acceleration based on the preceding three passes.passNumber
- Number of times dynamics have been calculated. Dynamics must be calculated four times in total, not to be confused
with the four featherstone passes involved in each calculation.public void jointDependentRecordK(int passNumber)
Joint
passNumber
- Current pass number of doDynamics. There are a total of 4 passes numbered 0 - 3.public void recursiveEulerIntegrate(double stepSize)
Joint
stepSize
- Step size for the Euler Integrationpublic void recursiveSaveTempState()
Joint
public void recursiveRestoreTempState()
Joint
public void recursiveRungeKuttaSum(double stepSize)
Joint
doDynamics
.
The RK4 method operates in the following form:
y_(n+1) = y_n + 1/6 * h * (k_1 + 2k_2 + 2k_3 + k_4
t_(n+1) = t_n + h
Where:
h is the step size
k_1 = f(t_n, y_n)
k_2 = f(t_n + 0.5 * h, y_n + 0.5 * h * k_1)
k_3 = f(t_n + 0.5 * h, y_n + 0.5 * h * k_2)
k_4 = f(t_n + h, y_n + h * k_3)
stepSize
- The step size h, for use in calculation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |