|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaspack.spatialmotion.RigidBodyCoupling
maspack.spatialmotion.SegmentedPlanarCoupling
public class SegmentedPlanarCoupling
Field Summary |
---|
Fields inherited from class maspack.spatialmotion.RigidBodyCoupling |
---|
BILATERAL, LINEAR, ROTARY |
Constructor Summary | |
---|---|
SegmentedPlanarCoupling()
|
|
SegmentedPlanarCoupling(double[] segs)
|
Method Summary | |
---|---|
Plane |
closestPlane(Point3d p)
Returns the plane closest to a specified point in the D coordinate frame. |
void |
getConstraintInfo(maspack.spatialmotion.RigidBodyCoupling.ConstraintInfo[] info,
RigidTransform3d XCD,
RigidTransform3d XFD,
RigidTransform3d XERR,
boolean setEngaged)
Computes the constraint frame C and the associated constraint information. |
java.util.ArrayList<Plane> |
getPlanes()
Returns a list of the planes in frame D. |
java.util.ArrayList<Point3d> |
getSegmentPoints()
Returns a list of points describing the piecewise linear curve in the D frame x-z plane which defines the plane segments. |
void |
initializeConstraintInfo(maspack.spatialmotion.RigidBodyCoupling.ConstraintInfo[] info)
|
boolean |
isUnilateral()
|
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. |
int |
numPlanes()
Returns the number of planar segments associated with this coupling. |
void |
projectToConstraint(RigidTransform3d XCD,
RigidTransform3d XFD)
Computes the frame C on the constraint surface which is closest to a given frame F. |
void |
scaleDistance(double s)
|
void |
setSegments(double[] segs)
Sets the plane segments associated with this SegmentedPlanarCoupling. |
void |
setUnilateral(boolean unilateral)
|
void |
transformGeometry(AffineTransform3dBase X,
RotationMatrix3d Ra,
RigidTransform3d XFW,
RigidTransform3d XDW)
Transforms the geometry of this coupling, in response to an affine transform X applied in world coordinates. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SegmentedPlanarCoupling()
public SegmentedPlanarCoupling(double[] segs)
Method Detail |
---|
public java.util.ArrayList<Point3d> getSegmentPoints()
public java.util.ArrayList<Plane> getPlanes()
public int numPlanes()
public void setUnilateral(boolean unilateral)
public boolean isUnilateral()
public void setSegments(double[] segs)
segs
- x-z coordinate pairs defining the segmentspublic Plane closestPlane(Point3d p)
p
- point to find nearest plane topublic int maxUnilaterals()
RigidBodyCoupling
maxUnilaterals
in class RigidBodyCoupling
public int numBilaterals()
RigidBodyCoupling
numBilaterals
in class RigidBodyCoupling
public void projectToConstraint(RigidTransform3d XCD, RigidTransform3d XFD)
RigidBodyCoupling
projectToConstraint
in class RigidBodyCoupling
XCD
- returns the transform from C to DXFD
- transform from frame F to Dpublic void initializeConstraintInfo(maspack.spatialmotion.RigidBodyCoupling.ConstraintInfo[] info)
initializeConstraintInfo
in class RigidBodyCoupling
public void getConstraintInfo(maspack.spatialmotion.RigidBodyCoupling.ConstraintInfo[] info, RigidTransform3d XCD, RigidTransform3d XFD, 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 C) 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 XFC. 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 wrenchesXCD
- returns the transform from C to DXFD
- transform from operation frame F to DXERR
- TODOsetEngaged
- if true
, this method should determine
if the constraint is engaged.public void scaleDistance(double s)
scaleDistance
in class RigidBodyCoupling
public void transformGeometry(AffineTransform3dBase X, RotationMatrix3d Ra, RigidTransform3d XFW, RigidTransform3d XDW)
RigidBodyCoupling
X.M = P RaGiven these arguments, a point p of the coupling defined with respect to frame D would transform according to
p' = XDW.R^T Ra^T X.M XDW.R pwhich is equivalent to transforming p to world coordinates (using XDW), applying X, and then transforming back to D using the modified XDW produced by applying X.
transformGeometry
in class RigidBodyCoupling
X
- affine transform applied to the coupling in world coordinatesRa
- rotational component of the matrix part of X.XFW
- current transform from F to worldXDW
- current transform from D to world
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |