public class FreeJoint extends JointBase
The x
, y
, z
, roll
, pitch
and
yaw
coordinates are available as properties which can be read and
also, under appropriate circumstances, set. The angle properties are
reported in degrees. Setting these values causes an adjustment in the
positions of one or both bodies connected to this joint, along with adjacent
bodies connected to them, with preference given to bodies that are not
attached to ``ground''. If this is done during simulation, and particularly
if one or both of the bodies connected to this joint are moving dynamically,
the results will be unpredictable and will likely conflict with the
simulation.
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static PropertyList |
myProps |
static int |
PITCH_IDX |
static int |
ROLL_IDX |
static int |
X_IDX |
static int |
Y_IDX |
static int |
YAW_IDX |
static int |
Z_IDX |
DEFAULT_SHAFT_LENGTH, DEFAULT_SHAFT_RADIUS
debug, useOldDerivativeMethod
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATING
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
FreeJoint()
Creates a
FreeJoint which is not attached to any bodies. |
FreeJoint(ConnectableBody bodyA,
ConnectableBody bodyB,
Point3d originD)
Creates a
FreeJoint connecting two connectable bodies, bodyA and bodyB . |
FreeJoint(ConnectableBody bodyA,
ConnectableBody bodyB,
RigidTransform3d TDW)
Creates a
FreeJoint connecting two connectable bodies,
bodyA and bodyB . |
FreeJoint(ConnectableBody bodyA,
ConnectableBody bodyB,
RigidTransform3d TCW,
RigidTransform3d TDW)
Creates a
FreeJoint connecting two connectable bodies,
bodyA and bodyB . |
FreeJoint(ConnectableBody bodyA,
RigidTransform3d TDW)
Creates a
FreeJoint connecting a single connectable body,
bodyA , to ground. |
FreeJoint(GimbalJoint.AxisSet axes) |
FreeJoint(RigidBody bodyA,
RigidTransform3d TCA,
RigidBody bodyB,
RigidTransform3d TDB)
Creates a
FreeJoint connecting two rigid bodies, bodyA
and bodyB . |
Modifier and Type | Method and Description |
---|---|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
boolean |
getApplyEuler() |
GimbalJoint.AxisSet |
getAxes() |
double |
getMaxPitch()
Queries the upper pitch range limit for this joint, in degrees.
|
double |
getMaxRoll()
Queries the upper roll range limit for this joint, in degrees.
|
double |
getMaxYaw()
Queries the upper yaw range limit for this joint, in degrees.
|
double |
getMinPitch()
Queries the lower pitch range limit for this joint, in degrees.
|
double |
getMinRoll()
Queries the lower roll range limit for this joint, in degrees.
|
double |
getMinYaw()
Queries the lower yaw range limit for this joint, in degrees.
|
double |
getPitch()
Queries this joint's pitch value, in degrees.
|
DoubleInterval |
getPitchRange()
Queries the pitch range limits for this joint, in degrees.
|
double |
getRoll()
Queries this joint's roll value, in degrees.
|
DoubleInterval |
getRollRange()
Queries the roll range limits for this joint, in degrees.
|
Vector3d |
getRpyRad() |
double |
getX()
Queries this joint's x value.
|
DoubleInterval |
getXRange()
Queries the x range limits for this joint.
|
double |
getY()
Queries this joint's y value.
|
double |
getYaw()
Queries this joint's yaw value, in degrees.
|
DoubleInterval |
getYawRange()
Queries the yaw range limits for this joint, in degrees.
|
DoubleInterval |
getYRange()
Queries the y range limits for this joint.
|
double |
getZ()
Queries this joint's z value.
|
DoubleInterval |
getZRange()
Queries the z range limits for this joint.
|
boolean |
isPitchLocked()
Queries whether the pitch coordinate for this joint is locked.
|
boolean |
isRollLocked()
Queries whether the roll coordinate for this joint is locked.
|
boolean |
isXLocked()
Queries whether the x coordinate for this joint is locked.
|
boolean |
isYawLocked()
Queries whether the yaw coordinate for this joint is locked.
|
boolean |
isYLocked()
Queries whether the y coordinate for this joint is locked.
|
boolean |
isZLocked()
Queries whether the z coordinate for this joint is locked.
|
void |
setApplyEuler(boolean apply) |
void |
setMaxPitch(double max)
Sets the upper pitch range limit for this joint, in degrees.
|
void |
setMaxRoll(double max)
Sets the upper roll range limit for this joint, in degrees.
|
void |
setMaxYaw(double max)
Sets the upper yaw range limit for this joint, in degrees.
|
void |
setMinPitch(double min)
Sets the lower pitch range limit for this joint, in degrees.
|
void |
setMinRoll(double min)
Sets the lower roll range limit for this joint, in degrees.
|
void |
setMinYaw(double min)
Sets the lower yaw range limit for this joint, in degrees.
|
void |
setPitch(double pitch)
Sets this joint's pitch value, in degrees.
|
void |
setPitchLocked(boolean locked)
Set whether the pitch coordinate for this joint is locked.
|
void |
setPitchRange(double min,
double max)
Sets the pitch range limits for this joint, in degrees.
|
void |
setPitchRange(DoubleInterval range)
Sets the pitch range limits for this joint, in degrees.
|
void |
setRoll(double roll)
Sets this joint's roll value, in degrees.
|
void |
setRollLocked(boolean locked)
Set whether the roll coordinate for this joint is locked.
|
void |
setRollRange(double min,
double max)
Sets the roll range limits for this joint, in degrees.
|
void |
setRollRange(DoubleInterval range)
Sets the roll range limits for this joint, in degrees.
|
void |
setRpyRad(Vector3d rpy) |
void |
setX(double x)
Sets this joint's x value.
|
void |
setXLocked(boolean locked)
Set whether the x coordinate for this joint is locked.
|
void |
setXRange(DoubleInterval range)
Sets the x range limits for this joint.
|
void |
setY(double y)
Sets this joint's y value.
|
void |
setYaw(double yaw)
Sets this joint's yaw value, in degrees.
|
void |
setYawLocked(boolean locked)
Set whether the yaw coordinate for this joint is locked.
|
void |
setYawRange(double min,
double max)
Sets the yaw range limits for this joint, in degrees.
|
void |
setYawRange(DoubleInterval range)
Sets the yaw range limits for this joint, in degrees.
|
void |
setYLocked(boolean locked)
Set whether the y coordinate for this joint is locked.
|
void |
setYRange(DoubleInterval range)
Sets the y range limits for this joint.
|
void |
setZ(double z)
Sets this joint's z value.
|
void |
setZLocked(boolean locked)
Set whether the z coordinate for this joint is locked.
|
void |
setZRange(DoubleInterval range)
Sets the z range limits for this joint.
|
addCoordinateSolveBlocks, addCoordinateVelJacobian, applyCoordinateForce, coordinatesToTCD, getCoordinate, getCoordinateDeg, getCoordinateIndex, getCoordinateMotionType, getCoordinateName, getCoordinateRange, getCoordinateRangeDeg, getCoordinates, getCoordinateSpeed, getCoordinateValue, getMaxCoordinate, getMaxCoordinateDeg, getMinCoordinate, getMinCoordinateDeg, getPosition, getShaftLength, getShaftRadius, getStoredCoordinates, getStoredTCD, getStoredTCD, isCoordinateLocked, numCoordinates, setCoordinate, setCoordinateDeg, setCoordinateLocked, setCoordinateName, setCoordinateRange, setCoordinateRangeDeg, setCoordinates, setShaftLength, setShaftRadius
addBilateralConstraints, addFrictionConstraints, addMasterBlocks, addTransformableDependencies, addUnilateralConstraints, computeConstraintMatrixA, computeConstraintMatrixB, connectToHierarchy, copy, disconnectFromHierarchy, findAttachedBodies, getActivation, getAxisLength, getBilateralForceInA, getBilateralForceInA, getBilateralForceInB, getBilateralForceInB, getBilateralForceInC, getBilateralForceInC, getBilateralForces, getBilateralInfo, getBilateralSizes, getBodyA, getBodyB, getCompliance, getConstrainedComponents, getConstraint, getConstraintFlags, getConstraintForce, getCopyReferences, getCoupling, getCurrentTCD, getCurrentTCW, getCurrentTCW, getCurrentTDW, getCurrentTDW, getDamping, getDrawFrameC, getDrawFrameD, getFrameAttachmentA, getFrameAttachmentB, getFrictionForces, getFrictionState, getHardReferences, getLinearCompliance, getPenetrationTol, getPenetrationTolMode, getPose, getRenderFrame, getRotaryCompliance, getRotaryLimitTol, getRotaryLimitTolMode, getState, getStateVersion, getTransformDGeometryOnly, getTransformPositionOnly, getUnilateralForceInA, getUnilateralForceInA, getUnilateralForceInB, getUnilateralForceInB, getUnilateralForceInC, getUnilateralForceInC, getUnilateralForces, getUnilateralInfo, getUnilateralSizes, getUnilateralState, hasState, isActive, isConnectedToBodies, isDuplicatable, isEnabled, isNotAttached, maxFrictionConstraintSets, numBilateralConstraints, numConstraints, numEngagedUnilateralConstraints, numUnilateralConstraints, prerender, printConnectedBodies, printConstraintInfo, render, scaleDistance, scaleMass, setAlwaysAdjustBodyA, setAxisLength, setBilateralForces, setBodies, setBodies, setBodies, setBodies, setCompliance, setCurrentTCW, setCurrentTDW, setDamping, setDrawFrameC, setDrawFrameD, setEnabled, setFrictionForces, setFrictionState, setLinearCompliance, setPenetrationTol, setPenetrationTolMode, setRotaryCompliance, setRotaryLimitTol, setRotaryLimitTolMode, setState, setTransformDGeometryOnly, setTransformPositionOnly, setUnilateralForces, setUnilateralState, transformGeometry, transformGeometry, updateAttachments, updateBounds, updateConstraints, zeroForces
createRenderProps, defaultRenderPropsAreNull, getRenderHints, getRenderProps, getSelection, isSelectable, isVisible, numSelectionQueriesNeeded, setRenderProps, setVisible, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, createTempFlag, getChildren, getGrandParent, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
transformPriority
advanceState, getAuxVarDerivative, getAuxVarState, numAuxVars, requiresAdvance, setAuxVarState
getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getProperty
getChildren, hasChildren
postscan
isWritable, write
public static final int X_IDX
public static final int Y_IDX
public static final int Z_IDX
public static final int ROLL_IDX
public static final int PITCH_IDX
public static final int YAW_IDX
public static PropertyList myProps
public FreeJoint()
FreeJoint
which is not attached to any bodies. It
can subsequently be connected using one of the setBodies
methods.public FreeJoint(GimbalJoint.AxisSet axes)
public FreeJoint(RigidBody bodyA, RigidTransform3d TCA, RigidBody bodyB, RigidTransform3d TDB)
FreeJoint
connecting two rigid bodies, bodyA
and bodyB
. If A and B describe the coordinate frames of bodyA
and bodyB
, then TCA
and TDB
give the
(fixed) transforms from the joint's C and D frames to A and B,
respectively. Since C and D are specified independently, the joint
transform TCD may not necessarily be initialized to the identity.
Specifying bodyB
as null
will cause bodyA
to
be connected to ground, with TDB
then being the same as TDW
.
bodyA
- rigid body ATCA
- transform from joint frame C to body frame AbodyB
- rigid body B (or null
)TDB
- transform from joint frame D to body frame Bpublic FreeJoint(ConnectableBody bodyA, ConnectableBody bodyB, RigidTransform3d TCW, RigidTransform3d TDW)
FreeJoint
connecting two connectable bodies,
bodyA
and bodyB
. The joint frames C and D are located
independently with respect to world coordinates by TCW
and TDW
.
Specifying bodyB
as null
will cause bodyA
to
be connected to ground.
bodyA
- body AbodyB
- body B (or null
)TCW
- initial transform from joint frame C to worldTDW
- initial transform from joint frame D to worldpublic FreeJoint(ConnectableBody bodyA, ConnectableBody bodyB, RigidTransform3d TDW)
FreeJoint
connecting two connectable bodies,
bodyA
and bodyB
. The joint frames D and C are assumed to
be initially coincident, so that roll
, pitch
and yaw
with have initial values of 0. D (and C) is located by TDW
,
which gives the transform from D to world coordinates.bodyA
- body AbodyB
- body BTDW
- initial transform from joint frames D and C to worldpublic FreeJoint(ConnectableBody bodyA, RigidTransform3d TDW)
FreeJoint
connecting a single connectable body,
bodyA
, to ground. The joint frames D and C are assumed to be
initially coincident, so that roll
, pitch
and yaw
with have initial values of 0. D (and C) is located by TDW
, which
gives the transform from D to world coordinates.bodyA
- body ATDW
- initial transform from joint frames D and C to worldpublic FreeJoint(ConnectableBody bodyA, ConnectableBody bodyB, Point3d originD)
FreeJoint
connecting two connectable bodies, bodyA
and bodyB
. The joint frames D and C are assumed to be
initially coincident, so that roll
, pitch
and yaw
with have initial values of 0. D (and C) is located (with respect to
world) so that its origin is at originD
and its axes are aligned
with the world.
Specifying bodyB
as null
will cause bodyA
to
be connected to ground.
bodyA
- body AbodyB
- body B, or null
if bodyA
is connected
to ground.originD
- origin of frame D (world coordinates)public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class JointBase
public GimbalJoint.AxisSet getAxes()
public Vector3d getRpyRad()
public void setRpyRad(Vector3d rpy)
public double getX()
setX(double)
for more details.public void setX(double x)
x
- new x valuepublic DoubleInterval getXRange()
setXRange(DoubleInterval)
for more details.public void setXRange(DoubleInterval range)
[-inf, inf]
, which implies no limits. If x travels beyond
these limits during dynamic simulation, unilateral constraints will be
activated to enforce them. Setting the lower limit to -inf
or the
upper limit to inf
removes the lower or upper limit,
respectively. Specifying range
as null
will set the range
to (-inf, inf)
.range
- x range limits for this jointpublic boolean isXLocked()
true
if x is lockedpublic void setXLocked(boolean locked)
locked
- if true
, locks xpublic double getY()
setY(double)
for more details.public void setY(double y)
y
- new y valuepublic DoubleInterval getYRange()
setYRange(DoubleInterval)
for more details.public void setYRange(DoubleInterval range)
[-inf, inf]
, which implies no limits. If y travels beyond
these limits during dynamic simulation, unilateral constraints will be
activated to enforce them. Setting the lower limit to -inf
or the
upper limit to inf
removes the lower or upper limit,
respectively. Specifying range
as null
will set the range
to (-inf, inf)
.range
- y range limits for this jointpublic boolean isYLocked()
true
if y is lockedpublic void setYLocked(boolean locked)
locked
- if true
, locks ypublic double getZ()
setZ(double)
for more details.public void setZ(double z)
z
- new z valuepublic DoubleInterval getZRange()
setZRange(DoubleInterval)
for more details.public void setZRange(DoubleInterval range)
[-inf, inf]
, which implies no limits. If z travels beyond
these limits during dynamic simulation, unilateral constraints will be
activated to enforce them. Setting the lower limit to -inf
or the
upper limit to inf
removes the lower or upper limit,
respectively. Specifying range
as null
will set the range
to (-inf, inf)
.range
- z range limits for this jointpublic boolean isZLocked()
true
if z is lockedpublic void setZLocked(boolean locked)
locked
- if true
, locks zpublic double getRoll()
setRoll(double)
for
more details.public void setRoll(double roll)
roll
- new roll valuepublic DoubleInterval getRollRange()
setRollRange(DoubleInterval)
for more details.public double getMinRoll()
public double getMaxRoll()
public void setRollRange(DoubleInterval range)
[-inf, inf]
, which implies no limits. If roll travels beyond
these limits during dynamic simulation, unilateral constraints will be
activated to enforce them. Setting the lower limit to -inf
or the
upper limit to inf
removes the lower or upper limit,
respectively. Specifying range
as null
will set the range
to (-inf, inf)
.range
- roll range limits for this jointpublic void setRollRange(double min, double max)
setRollRange(DoubleInterval)
.min
- minimum roll valuemax
- maximum roll valuepublic void setMaxRoll(double max)
inf
removes the upper limit.max
- upper roll range limitpublic void setMinRoll(double min)
-inf
removes the lower limit.min
- lower roll range limitpublic boolean isRollLocked()
true
if roll is lockedpublic void setRollLocked(boolean locked)
locked
- if true
, locks rollpublic double getPitch()
setPitch(double)
for
more details.public void setPitch(double pitch)
pitch
- new pitch valuepublic DoubleInterval getPitchRange()
setPitchRange(DoubleInterval)
for more details.public double getMinPitch()
public double getMaxPitch()
public void setPitchRange(DoubleInterval range)
[-inf, inf]
, which implies no limits. If pitch travels beyond
these limits during dynamic simulation, unilateral constraints will be
activated to enforce them. Setting the lower limit to -inf
or the
upper limit to inf
removes the lower or upper limit,
respectively. Specifying range
as null
will set the range
to (-inf, inf)
.range
- pitch range limits for this jointpublic void setPitchRange(double min, double max)
setPitchRange(DoubleInterval)
.min
- minimum pitch valuemax
- maximum pitch valuepublic void setMaxPitch(double max)
inf
removes the upper limit.max
- upper pitch range limitpublic void setMinPitch(double min)
-inf
removes the lower limit.min
- lower pitch range limitpublic boolean isPitchLocked()
true
if pitch is lockedpublic void setPitchLocked(boolean locked)
locked
- if true
, locks pitchpublic double getYaw()
setYaw(double)
for
more details.public void setYaw(double yaw)
yaw
- new yaw valuepublic DoubleInterval getYawRange()
setYawRange(DoubleInterval)
for more details.public double getMinYaw()
public double getMaxYaw()
public void setYawRange(DoubleInterval range)
[-inf, inf]
, which implies no limits. If yaw travels beyond
these limits during dynamic simulation, unilateral constraints will be
activated to enforce them. Setting the lower limit to -inf
or the
upper limit to inf
removes the lower or upper limit,
respectively. Specifying range
as null
will set the range
to (-inf, inf)
.range
- yaw range limits for this jointpublic void setYawRange(double min, double max)
setYawRange(DoubleInterval)
.min
- minimum yaw valuemax
- maximum yaw valuepublic void setMaxYaw(double max)
inf
removes the upper limit.max
- upper yaw range limitpublic void setMinYaw(double min)
-inf
removes the lower limit.min
- lower yaw range limitpublic boolean isYawLocked()
true
if yaw is lockedpublic void setYawLocked(boolean locked)
locked
- if true
, locks yawpublic void setApplyEuler(boolean apply)
public boolean getApplyEuler()