|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Functional interface for a multi-point contact solver.
Field Summary | |
static double |
AUTO_EPSILON
Indicates that numeric tolerances should be computed automatially for each solution. |
static int |
CYCLING_DETECTED
Return code indicating that the solver was unable to find a contact solution because Lemke's algorithm started to cycle. |
static int |
NUMERIC_ERROR
Return code indicating that the solver was unable to find a contact solution because Lemke's algorithm encountered a numeric error. |
static int |
SHOW_BASIS
Debugging flag requesting that the current basis be displayed for each pivot operation. |
static int |
SHOW_LEXICO_MINRATIO
Debugging flag requesting display of the numbers and pivot candidates involved in the full minimum ratio test for each pivot operation, including the breaking of ties. |
static int |
SHOW_MINRATIO
Debugging flag requesting display of the numbers and pivot candidates involved in the minimum ratio test for each pivot operation. |
static int |
SOLVED
Return code indicating that a contact solution was successfully calculated. |
static int |
UNBOUNDED_RAY
Return code indicating that the solver was unable to find a contact solution because Lemke's algorithm terminated with an unbounded ray. |
Method Summary | |
boolean |
getActivityReportingEnabled()
Experimental method. |
boolean |
getBasisPresetEnabled()
Experimental method. |
java.lang.String |
getBasisString()
Returns a string describing the basis associated with the most recently computed solution. |
boolean |
getCoriolisEnabled()
Returns true if coriolis forces are included in second order motion calculations. |
double |
getEpsilon()
Returns the numeric tolerance that was used for the most recent contact solution. |
boolean |
getFrictionEnabled()
Returns true if friction computation is enabled for this solver. |
double |
getMinimumSpeed()
Experimental method. |
int |
getNumFrictionDirections()
Sets the number of friction directions used by this solver. |
int |
getPivotCount()
Returns the number of pivots that the solver has performed. |
boolean |
getRestitutionEnabled()
Returns true if restitution computation is enabled for this solver. |
double |
getRestitutionThreshold()
Gets the restitution threshold for this solver. |
int |
getSolutionOrder()
Returns the order used to compute contact solutions. |
double |
getStabilizingDistance()
Returns the currently stabilizing distance. |
void |
resetPivotCount()
Sets the solver pivot count to 0. |
void |
setActivityReportingEnabled(boolean enable)
Experimental method. |
void |
setBasisPresetEnabled(boolean enable)
Experimental method. |
void |
setCoriolisEnabled(boolean enable)
Enables the inclusion of coriolis forces for second order motion calculations. |
void |
setDebug(int flag)
Enables the printing of debug information. |
void |
setEpsilon(double eps)
Sets the numeric tolerance that should be used for contact solutions. |
void |
setFrictionEnabled(boolean enable)
Enables/disables friction computation for this solver. |
void |
setMinimumSpeed(double minSpeed)
Experimental method. |
void |
setNumFrictionDirections(int numdirs)
Sets the number of friction directions to be used by this solver (i.e., the number of sides in the polyhedral approximation to the friction cone). |
void |
setRestitutionEnabled(boolean enable)
Enables/disables restitution computation for this solver. |
void |
setRestitutionThreshold(double threshold)
Sets the restitution threshold for this solver. |
void |
setSolutionOrder(int order)
Sets the order used to compute contact solutions. |
void |
setStabilizingDistance(double dist)
Sets the solver's stabilizing distance. |
int |
solve(Twist[] newVels,
Contact[] contacts,
int ncontacts,
RigidTransform3d[] XBodiesToWorld,
Twist[] vels,
SpatialInertia[] inertias,
Wrench[] appliedForces,
double timeStep)
Solves a multi-point contact problem for multiple rigid bodies. |
int |
solve(Twist newVel,
Contact[] contacts,
int ncontacts,
RigidTransform3d XBodyToWorld,
Twist vel,
SpatialInertia inertia,
Wrench appliedForce,
double timeStep)
Solves a multi-point contact problem for a single rigid body. |
Field Detail |
public static final int SOLVED
public static final int UNBOUNDED_RAY
public static final int CYCLING_DETECTED
public static final double AUTO_EPSILON
public static final int SHOW_BASIS
public static final int SHOW_MINRATIO
public static final int SHOW_LEXICO_MINRATIO
public static final int NUMERIC_ERROR
Method Detail |
public double getEpsilon()
setEpsilon(double)
public void setEpsilon(double eps)
AUTO_EPSILON
indicates
that the tolerance should be computed automatically whenever a
solution is computed, after which it may be queried using getEpsilon
.
eps
- numeric tolerancepublic void setDebug(int flag)
flag
- debugging flag. Should be one of
SHOW_BASIS
,
SHOW_MINRATIO
, or
SHOW_LEXICO_MINRATIO
.public int getPivotCount()
resetPivotCount()
public void resetPivotCount()
getPivotCount()
public int getSolutionOrder()
setSolutionOrder(int)
public void setSolutionOrder(int order)
order
- desired solution order (1 or 2)getSolutionOrder()
public double getStabilizingDistance()
setStabilizingDistance(double)
public void setStabilizingDistance(double dist)
dist
units at each of the contact points.
dist
- stabilizing distancepublic int solve(Twist[] newVels, Contact[] contacts, int ncontacts, RigidTransform3d[] XBodiesToWorld, Twist[] vels, SpatialInertia[] inertias, Wrench[] appliedForces, double timeStep)
contact
array.
Information for each contact
includes indices identifiying the two bodies associated with
it. These indices should correspond to the indices the body with
respect to newVels
, XBodiesToWorld
,
etc. For contacts between a body and a fixed object, the first body
index should reflect the body in question, and the second body index
should be set to -1.
newVels
- returns the updated velocities calculated for each
rigid body, in body coordinatescontacts
- array of information about each contactncontacts
- number of contactsXBodiesToWorld
- spatial body-to-world transform
for each rigid bodyvels
- initial spatial velocity for each rigid body, in body
coordinates (only used if the order
of the
solution is 2)inertias
- spatial inertia for each rigid body,
in body coordinatesappliedForces
- external forces applied to each
rigid body, in body coordinatestimeStep
- time step size associated with the motion (only
applicable if the order
of the solution is
2)public int solve(Twist newVel, Contact[] contacts, int ncontacts, RigidTransform3d XBodyToWorld, Twist vel, SpatialInertia inertia, Wrench appliedForce, double timeStep)
contacts
array. For each contact, the first body index
is assumed to correspond to the rigid body in question and should be
set to 0, and the second body index is assumed to correspond to a
fixed object and should be set to -1.
newVel
- returns the updated velocity calculated
in body coordinatescontacts
- array of information about each contactncontacts
- number of contactsXBodyToWorld
- spatial body-to-world transform
for the rigid bodyvel
- initial spatial velocity the rigid body, in body
coordinates (only used if the order
of the
solution is 2)inertia
- spatial inertia for the rigid body, in body
coordinatesappliedForce
- external forces applied to the
rigid body, in body coordinatestimeStep
- time step associated with the motion (only
applicable if the order
of the solution is
2)public void setFrictionEnabled(boolean enable)
enable
- enables friction computation if truegetFrictionEnabled()
public boolean getFrictionEnabled()
setFrictionEnabled(boolean)
public void setRestitutionEnabled(boolean enable)
contact
.
enable
- enables restitution computation if truegetRestitutionEnabled()
public boolean getRestitutionEnabled()
setRestitutionEnabled(boolean)
public void setRestitutionThreshold(double threshold)
threshold
- minimum normal speedsetRestitutionEnabled(boolean)
public double getRestitutionThreshold()
setRestitutionThreshold(double)
public void setNumFrictionDirections(int numdirs)
numdirs
- number of friction directionsgetNumFrictionDirections()
public int getNumFrictionDirections()
setNumFrictionDirections(int)
public void setBasisPresetEnabled(boolean enable)
public boolean getBasisPresetEnabled()
public boolean getActivityReportingEnabled()
public void setActivityReportingEnabled(boolean enable)
public boolean getCoriolisEnabled()
public void setCoriolisEnabled(boolean enable)
enable
- if true, enables coriolis force calculationpublic void setMinimumSpeed(double minSpeed)
public double getMinimumSpeed()
public java.lang.String getBasisString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |