|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectshady.common.multi.chain.Block
shady.common.multi.chain.StickBlock
public class StickBlock
Controller for a tower "stick"
The stick is composed of one MemberShadys (M[0]) and one segment
(S[0]), all of length SL:
|
|
S0
|
|r
|
M0
|
|
|l
Angles and lengths in the figure are not precise, but
illustrate that, in nominal pose (DOF = 0.0), the shady is below
holding the segment straight up.
Copyright (C) 2006 Marsette A. Vona, III
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
| Field Summary | |
|---|---|
static double |
CC
The length of each shady. |
private static java.lang.String |
cvsid
CVS id. |
protected Point.OnSegment |
eePoint
The end-effector point, which is at 0.5 along the body segment of member 2. |
static int |
NUM_MEMBERS
Number of member shadys in this stick block. |
static int |
NUM_SEGMENTS
Number of segments in this stick block. |
static double |
SL
The length of the muntin. |
static double |
THETA_MAX_ABS
The absolute value of the maximum possible tilt angle. |
| Fields inherited from class shady.common.multi.chain.Block |
|---|
dof, leftBarrel, locked, memberStartIndex, multiEnvironment, multiShady, next, numMembers, numSegments, previous, rightBarrel, segmentStartIndex, sentinel, transform |
| Constructor Summary | |
|---|---|
StickBlock(MultiShadyCommonAPI multiShady,
MultiEnvironment multiEnvironment,
Sentinel sentinel)
TBD |
|
| Method Summary | |
|---|---|
double |
getEEOrientationOffset()
Return the offset in radians of the EE frame orientation relative to the orientation of the Segment of the end-effector point. |
Point.OnSegment |
getEEPoint()
Get the end-effector point. |
protected void |
initMembersAndSegments()
Subclasses must implement this to set up the MemberShadys and environment segments. |
protected void |
recompute(vona.math.RigidTransform2D transform,
double delta)
Subclasses must implement this to compute the transform from the Block.previouss end frame to this block's end frame according to Block.dof,
and possibly to update Block.leftBarrel and Block.rightBarrel from Block.dof. |
protected boolean |
recoverDOF()
Try to figure out the current Block.dof from the state of the barrel
angles in Block.multiShady. |
| Methods inherited from class shady.common.multi.chain.Block |
|---|
getDOF, getNext, getPrevious, getTransform, getTransform, hasNext, hasPrevious, isLocked, isSentinel, lock, lock, recompute, reverseUpdate, reverseUpdateChain, setDOF, setNominal, tweakDOF, unlock, update, updateChain |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String cvsid
CVS id.
public static final int NUM_MEMBERS
Number of member shadys in this stick block.
public static final int NUM_SEGMENTS
Number of segments in this stick block.
public static final double CC
The length of each shady.
public static final double SL
The length of the muntin.
public static final double THETA_MAX_ABS
The absolute value of the maximum possible tilt angle.
protected Point.OnSegment eePoint
The end-effector point, which is at 0.5 along the body segment of member 2.
| Constructor Detail |
|---|
public StickBlock(MultiShadyCommonAPI multiShady,
MultiEnvironment multiEnvironment,
Sentinel sentinel)
| Method Detail |
|---|
protected void initMembersAndSegments()
Subclasses must implement this to set up the MemberShadys and environment segments.
Block.numMembers and Block.numSegments must be set, and the
corresponding numbers of members and segments must be initialized
(according to Block.dof, Block.leftBarrel, Block.rightBarrel, and
Block.transform, which should all be consistent due to a prior call to
Block.recompute()) and added to Block.multiShady and Block.multiEnvironment. Internal barrels must be closed to form the block
topology, and barrels must be closed to connect to Block.previous iff
it's not a Sentinel.
This implementation creates the stick block. All of the barrels are gripped normally on the segments (ie not inverted). Internally, the right grippers are connected to the beginning of the segments (0.0) and the left grippers are connected to the ends (1.0).
initMembersAndSegments in class Block
protected void recompute(vona.math.RigidTransform2D transform,
double delta)
Subclasses must implement this to compute the transform from the Block.previouss end frame to this block's end frame according to Block.dof,
and possibly to update Block.leftBarrel and Block.rightBarrel from Block.dof.
This implementation makes use of geometry described in the header to compute the transform for a given delta which represents the theta of bending.
recompute in class Blocktransform - the computed transform is to be written here, not nulldelta - if non-zero then the DOF is incremented by this amount before
computing the transform (the persistent Block.dof is not affected).
This is used by ChainIK to compute columns of the chain Jacobian.
The barrel angles are (allocated and) computed iff delta is 0.0. The
caller must ensure that the incremented value will be in the range
[-1.0,1.0].protected boolean recoverDOF()
Try to figure out the current Block.dof from the state of the barrel
angles in Block.multiShady.
It can be assumed that the barrel angles were set as if by a
call to Block.recompute(RigidTransform2D, double). If this does not
appear to be the case then return false without modifying
dof.
This impl recovers DOF as set by recompute(vona.math.RigidTransform2D, double).
recoverDOF in class Blockpublic Point.OnSegment getEEPoint()
Get the end-effector point.
Note that the point may either reference a standard Segment or
the body segment of a member as returned by ShadyPose.getBodySegment(double).
This impl returns eePoint.
getEEPoint in class Blockpublic double getEEOrientationOffset()
Return the offset in radians of the EE frame orientation relative to
the orientation of the Segment of the end-effector point.
This impl returns -Math.PI/2.0.
getEEOrientationOffset in class BlockSegment of the end-effector point
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||