public class JointCoordinateHandle
extends java.lang.Object
| Constructor and Description |
|---|
JointCoordinateHandle()
No-args constructor needed for scan/write.
|
JointCoordinateHandle(JointBase joint,
int idx)
Creates a handle for a specific coordinate.
|
JointCoordinateHandle(JointCoordinateHandle ch)
Creates a copy of a handle for a specfic coordinate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addForceJacobian(SparseNumberedBlockMatrix M,
double s)
Used internally to add a term to the system solve matrix corresponding
to the coordinate's generalized force.
|
void |
addSolveBlocks(SparseNumberedBlockMatrix M)
Used internally to add blocks to a system solve matrix that are
associated with the coordinate's generalized force.
|
void |
applyForce(double f)
Applies a generalized force to the coordinate.
|
double |
clipToRange(double value)
Clips the specified coordinate value to its range.
|
double |
clipToRangeDeg(double value)
Clips the specified coordinate value to its range.
|
boolean |
equals(JointCoordinateHandle jch)
Checks if this coordinate handle equals another.
|
boolean |
equals(java.lang.Object obj) |
double |
getCompliance()
Queries the range limit compliance for this coordinate.
|
int |
getIndex()
Queries the index of the coordinate with respect to its joint.
|
JointBase |
getJoint()
Queries the joint associated with the coordinate.
|
int |
getLimitEngagement()
Queries the limit engagement status for the coordinate.
|
double |
getLockedValue()
Queries the locked value for this coordinate.
|
RigidBodyConstraint.MotionType |
getMotionType()
Queries the motion type for the coordinate.
|
java.lang.String |
getName()
Returns the name of the coordinate, or
null if the coordinate
is unnamed. |
double |
getRangeViolation()
Returns the amount by which the current coordinate's value exceeds its
range, or 0 if the coordinate is within range.
|
double |
getRangeViolationDeg()
Returns the amount by which the current coordinate's value exceeds its
range, or 0 if the coordinate is within range.
|
double |
getSpeed()
Queries the current speed of the coordinate.
|
double |
getSpeedDeg()
Queries the current speed of the coordinate, converting the value for
rotational coordinates to degrees/sec.
|
double |
getStoredValue()
Queries the current stored value of the coordinate (with no attempt to
recompute it).
|
double |
getStoredValueDeg()
Queries the current stored value of the coordinate (with no attempt to
recompute it) and converts the value of rotational coordinates to
degrees.
|
double |
getValue()
Queries the current value of the coordinate, recomputing it if
necessary.
|
double |
getValueDeg()
Queries the current value of the coordinate, recomputing it if necessary,
and converting the value of rotational coordinates to degrees.
|
DoubleInterval |
getValueRange()
Queries the range for the coordinate.
|
DoubleInterval |
getValueRangeDeg()
Queries the range for the coordinate, converting the values to degrees
for rotational coordinates.
|
Wrench |
getWrench()
Returns the wrench used to apply the generalized force
associated with this coordinate.
|
int |
hashCode() |
boolean |
isLocked()
Queries whether or not the coordinate is locked.
|
void |
postscan(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor) |
void |
scan(ReaderTokenizer rtok,
java.util.Deque<ScanToken> tokens) |
void |
set(JointCoordinateHandle ch)
Sets this coordinate handle from another.
|
void |
setCompliance(double c)
Sets the range limit compliance for this coordinate.
|
void |
setLocked(boolean locked)
Sets whether the coordinate is locked, meaning that it will hold its
current value.
|
void |
setLockedValue(double value)
Sets the locked value for this coordinate.
|
void |
setValue(double value)
Sets the value of the coordinate.
|
void |
setValueDeg(double value)
Sets the value of the coordinate, converting the value for rotational
coordinates to degrees.
|
void |
setValueRange(DoubleInterval range)
Sets the range for the coordinate.
|
void |
setValueRangeDeg(DoubleInterval range)
Sets the range for the coordinate, converting the values from degrees
for rotational coordinates.
|
void |
write(java.io.PrintWriter pw,
CompositeComponent ancestor) |
public JointCoordinateHandle()
public JointCoordinateHandle(JointBase joint, int idx)
joint - joint containing the coordinateidx - index of the coordinate within the jointpublic JointCoordinateHandle(JointCoordinateHandle ch)
ch - coordinate handle to be copiedpublic void set(JointCoordinateHandle ch)
ch - handle to be copiedpublic JointBase getJoint()
public int getIndex()
public java.lang.String getName()
null if the coordinate
is unnamed.null.public double getValue()
joint.getCoordinate(idx).public double getValueDeg()
public void setValue(double value)
joint.setCoordinate(idx,value).value - new coordinate valuepublic void setValueDeg(double value)
joint.setCoordinateDeg(idx,value).value - new coordinate value (in degrees for rotational coordinates)public double getStoredValue()
joint.getCoordinateValue(idx).public double getStoredValueDeg()
public DoubleInterval getValueRange()
joint.getCoordinateRange(idx).public void setValueRange(DoubleInterval range)
joint.setCoordinateRange(idx,range).range - new coordinate rangepublic DoubleInterval getValueRangeDeg()
joint.getCoordinateRangeDeg(idx).public void setValueRangeDeg(DoubleInterval range)
joint.setCoordinateRangeDeg(idx,range).range - new coordinate rangepublic double clipToRange(double value)
value - coordinate valuepublic double clipToRangeDeg(double value)
value - coordinate valuepublic double getRangeViolation()
public double getRangeViolationDeg()
public double getSpeed()
joint.getCoordinateSpeed(idx).public double getSpeedDeg()
public int getLimitEngagement()
public void applyForce(double f)
joint.applyCoordinateForce(idx,f).f - coordinate force to applypublic void addSolveBlocks(SparseNumberedBlockMatrix M)
M - system solve matrixpublic void addForceJacobian(SparseNumberedBlockMatrix M, double s)
M - system solve matrixs - force scale factorpublic RigidBodyConstraint.MotionType getMotionType()
public boolean isLocked()
true if the coordinate is lockedpublic void setLocked(boolean locked)
joint.setCoordinateLocked(idx,locked).locked - if true, locks the coordinatepublic double getLockedValue()
public void setLockedValue(double value)
value - new locked value for the coordinatepublic double getCompliance()
public void setCompliance(double c)
c - new range limit compliancepublic Wrench getWrench()
public void write(java.io.PrintWriter pw,
CompositeComponent ancestor)
throws java.io.IOException
java.io.IOExceptionpublic void scan(ReaderTokenizer rtok, java.util.Deque<ScanToken> tokens) throws java.io.IOException
java.io.IOExceptionpublic void postscan(java.util.Deque<ScanToken> tokens, CompositeComponent ancestor) throws java.io.IOException
java.io.IOExceptionpublic boolean equals(JointCoordinateHandle jch)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object