public class ParameterizedCoupling extends RigidBodyCoupling
Modifier and Type | Class and Description |
---|---|
static class |
ParameterizedCoupling.LimitType |
Modifier and Type | Field and Description |
---|---|
static double |
EPSILON |
BILATERAL, LINEAR, ROTARY, useNewDerivatives
Constructor and Description |
---|
ParameterizedCoupling(ParameterizedCoupling.LimitType type) |
Modifier and Type | Method and Description |
---|---|
void |
getConstraintInfo(maspack.spatialmotion.RigidBodyCoupling.ConstraintInfo[] info,
RigidTransform3d TGD,
RigidTransform3d TCD,
RigidTransform3d XERR,
boolean setEngaged)
Computes the constraint frame G and the associated constraint information.
|
ProjectedCurve3D |
getLimitCurve() |
ParameterizedCoupling.LimitType |
getLimitType() |
double |
getRoll(RigidTransform3d TGD) |
void |
getRollRange(double[] minmax)
Gets the minimum and maximum values for the coupling's roll angle (in
radians).
|
boolean |
hasRestrictedRollRange()
Returns true if this coupling has a range restriction;
|
void |
initializeConstraintInfo(maspack.spatialmotion.RigidBodyCoupling.ConstraintInfo[] info) |
int |
maxUnilaterals()
Returns the maximum number of unilateral constraints associated with this
coupling.
|
int |
numBilaterals()
Returns the number of bilateral constraints associated with this coupling.
|
void |
projectToConstraint(RigidTransform3d TGD,
RigidTransform3d TCD)
Computes the frame G on the constraint surface which is closest to a given
frame C.
|
void |
setLimitCurve(ProjectedCurve3D curve) |
void |
setRoll(RigidTransform3d TGD,
double roll) |
void |
setRollRange(double min,
double max)
Sets the minimum and maximum values for the coupling's roll angle (in
radians).
|
findNearestAngle, getAuxState, getBilateralConstraints, getBilateralForceG, getBilateralImpulses, getBreakAccel, getBreakSpeed, getCompliance, getConstraint, getConstraintInfo, getContactDistance, getDamping, getInitialAuxState, getUnilateralConstraints, getUnilateralForceG, getUnilateralImpulses, maxConstraints, numUnilaterals, printConstraintInfo, scaleDistance, setAuxState, setBilateralImpulses, setBreakAccel, setBreakSpeed, setCompliance, setContactDistance, setDamping, setDistanceAndZeroDerivative, setDistancesAndZeroDerivatives, setUnilateralImpulses, skipAuxState, transformGeometry, updateBodyStates, updateConstraintsFromC, updateUnilateralConstraints, zeroImpulses
public ParameterizedCoupling(ParameterizedCoupling.LimitType type)
public ParameterizedCoupling.LimitType getLimitType()
public void setRollRange(double min, double max)
ParameterizedCoupling.LimitType.ROLL
or ParameterizedCoupling.LimitType.ROLL_CURVE
.min
- Minimum roll anglemax
- Maximum roll anglepublic void getRollRange(double[] minmax)
minmax
- used to return the minimum and maximum valuessetRollRange(double, double)
public void setLimitCurve(ProjectedCurve3D curve)
public ProjectedCurve3D getLimitCurve()
public int maxUnilaterals()
RigidBodyCoupling
maxUnilaterals
in class RigidBodyCoupling
public int numBilaterals()
RigidBodyCoupling
numBilaterals
in class RigidBodyCoupling
public void projectToConstraint(RigidTransform3d TGD, RigidTransform3d TCD)
RigidBodyCoupling
projectToConstraint
in class RigidBodyCoupling
TGD
- returns the transform from G to DTCD
- transform from frame C to Dpublic void setRoll(RigidTransform3d TGD, double roll)
public void initializeConstraintInfo(maspack.spatialmotion.RigidBodyCoupling.ConstraintInfo[] info)
initializeConstraintInfo
in class RigidBodyCoupling
public double getRoll(RigidTransform3d TGD)
public boolean hasRestrictedRollRange()
public void getConstraintInfo(maspack.spatialmotion.RigidBodyCoupling.ConstraintInfo[] info, RigidTransform3d TGD, RigidTransform3d TCD, RigidTransform3d XERR, boolean setEngaged)
RigidBodyCoupling
Information for each constraint wrench is returned through an array of
ConstraintInfo objects supplied by the argument info
. This
array should have a fixed number of elements equal to the number of
bilateral constraints plus the maximum number of unilateral constraints.
Bilateral constraints appear first, followed by the unilateral
constraints. Constraint wrenches and their derivatives (with respect to
frame G) are set within the fields wrenchC
and
dotWrenchC
, repsectively. Distances to set within the
distance
; each of these should be the dot product of the
wrench with the linearization of the constraint error TCG. For computing
wrench derivatives, this method may use myVelBA
, which
gives the current velocity of B with repsect to A, in coordinate frame D.
Information only needs to be returned for constraints which are
potentially active, or engaged. Constraints which are
engaged have their ConstraintInfo.engaged
field set to a
non-zero value. Bilateral constraints are always engaged, and
their ConstraintInfo.engaged
field is automatically
set to 1 by the system. For unilateral constraints, the determination
of whether or not the constraint is engaged, and the setting of
the engaged
field, should be done
by this method if the argument setEngaged
is
true
. Otherwise, if setEngaged
is
false, the method should take the engaged settings as given.
Constraints which are engaged are those which
are returned by the calls getBilateralConstraints
or getUnilateralConstraints
.
getConstraintInfo
in class RigidBodyCoupling
info
- used to return information for each possible constraint wrenchesTGD
- returns the transform from G to DTCD
- transform from operation frame C to DXERR
- TODOsetEngaged
- if true
, this method should determine
if the constraint is engaged.