

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object shady.common.multi.chain.Block shady.common.multi.chain.TowerBlock
public class TowerBlock
Controller for a block in the original MultiShady tower.
This implementation is not a direct translation of the original scheme implementation, some details are different.
The block is composed of five MemberShadys (M[0..4]) and four segments
(S[0..3]), all of length SL
:
rS1lM2rS2l \ / M1 M3 \ / l r \ / S0 S3 \ / r l \ / M0 M4 \ / l rBelow is configuration when it is bent with some angles labeled. See shady.sim.ui.multi.blockbend.fig for a fully labeled version of this figure.
  d /  /  / \ c / \ / \ / b /  /  / b/ / / / / a e/Angles and lengths in the figure are not precise, but illustrate that, in nominal pose (DOF = 0.0), the block is a symmetric open trapezoid whose leg endpoints coincide vertically with the midpoints of S1 and S2. The endframe origin is at the midpoint of M2, the endframe xaxis coincides with the body vector (vector from l to r barrel) of M2, and the endframe yaxis points up. The orientations of all members and segments in the block form a clockwise headtotail chain starting at the free end of the left leg and ending at the free end of the right leg.
The top of the block is treated as a rigid segment, the distance between the leg endpoints is held fixed (CC+2SL), and the legs are abstracted as linear actuators. At least one leg is fully extended at all times: for DOF in the range [1.0,0.0) this is the right leg, and the block tilts to the left; for DOF in the range (0.0,1.0] the left leg is fully extended and the block tilts to the right. The length of the shortened leg is proportional to the DOF, and the total pose of the block is fully constrained by assuring that the lower angle on the fully extended leg is fixed. Additionally, the bend in the bent leg is fully constrained by assuring that the angles formed between the member shadys and the muntin between them are equal (defined as "b").
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 021111307, USA.
Field Summary  

static double 
BLOCK_LOWER_ANGLE
The lower angles in the nominal pose. 
static double 
BLOCK_UPPER_ANGLE
The upper angles in the nominal pose. 
static double 
BOTTOM
The length of the BOTTOM of the block: 2.0*SL+CC 
static double 
CC
The length of each shady. 
private static java.lang.String 
cvsid
CVS id. 
static double 
DPART
Defined in shady.sim.ui.multi.blockbend.fig. 
protected Point.OnSegment 
eePoint
The endeffector point, which is at 0.5 along the body segment of member 2. 
static double 
LEG_MAX
The maximum length of both legs in the tower. 
static double 
LEG_MIN
The minimum length of both legs in the tower. 
static double 
M3L_X
The x coordinate of the left gripper of the M3 shady in the nominal pose. 
static double 
M3L_Y
The y coordinate of the left gripper of the M3 shady in the nominal pose. 
static int 
NUM_MEMBERS
Number of member shadys in this tower block. 
static int 
NUM_SEGMENTS
Number of segments in this tower block. 
static double 
OTHER_DIAG
Defined in shady.sim.ui.multi.blockbend.fig. 
static double 
SL
The length of each muntin segment used in this tower block. 
static double 
THETA_MAX_ABS
The absolute value of the maximum possible tilt angle. 
static double 
TOP
The length of the top of the block: 2.0*SL+CC 
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  

TowerBlock(MultiShadyCommonAPI multiShady,
MultiEnvironment multiEnvironment,
Sentinel sentinel)
TBD 

TowerBlock(MultiShadyCommonAPI multiShady,
MultiEnvironment multiEnvironment,
Sentinel sentinel,
int memberStartIndex,
int segmentStartIndex)
TBD 
Method Summary  

double 
getEEOrientationOffset()
Return the offset in radians of the EE frame orientation relative to the orientation of the Segment of the endeffector point. 
Point.OnSegment 
getEEPoint()
Get the endeffector 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.previous s 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 tower block.
public static final int NUM_SEGMENTS
Number of segments in this tower block.
public static final double CC
The length of each shady.
public static final double SL
The length of each muntin segment used in this tower block.
public static final double TOP
The length of the top of the block: 2.0*SL+CC
public static final double BOTTOM
The length of the BOTTOM of the block: 2.0*SL+CC
public static final double LEG_MIN
The minimum length of both legs in the tower.
public static final double LEG_MAX
The maximum length of both legs in the tower.
public static final double BLOCK_UPPER_ANGLE
The upper angles in the nominal pose.
public static final double BLOCK_LOWER_ANGLE
The lower angles in the nominal pose.
public static final double OTHER_DIAG
Defined in shady.sim.ui.multi.blockbend.fig. This is the edge M3_l to M0_l in the triangle formed by M0_l, M3_l, and M4_r.
public static final double DPART
Defined in shady.sim.ui.multi.blockbend.fig. This is the angle located at M3_l in the triangle formed by M0_l, M3_l, and M4_r.
public static final double THETA_MAX_ABS
The absolute value of the maximum possible tilt angle.
public static final double M3L_X
The x coordinate of the left gripper of the M3 shady in the nominal pose. Note that the right gripper of M1 will have a value of 1.0*M3L_X in the nominal pose.
public static final double M3L_Y
The y coordinate of the left gripper of the M3 shady in the nominal pose. Note that the right gripper of M1 will have the same value in the nominal pose.
protected Point.OnSegment eePoint
The endeffector point, which is at 0.5 along the body segment of member 2.
Constructor Detail 

public TowerBlock(MultiShadyCommonAPI multiShady, MultiEnvironment multiEnvironment, Sentinel sentinel, int memberStartIndex, int segmentStartIndex)
public TowerBlock(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 tower 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). The first and last shady are connected to the midpoints of the segments on the top of the previous block iff the previous is not a sentinel.
initMembersAndSegments
in class Block
protected void recompute(vona.math.RigidTransform2D transform, double delta)
Subclasses must implement this to compute the transform from the Block.previous
s 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 Block
transform
 the computed transform is to be written here, not nulldelta
 if nonzero 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 Block
public Point.OnSegment getEEPoint()
Get the endeffector 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 Block
public double getEEOrientationOffset()
Return the offset in radians of the EE frame orientation relative to
the orientation of the Segment
of the endeffector point.
This impl returns 0.0
.
getEEOrientationOffset
in class Block
Segment
of the endeffector point


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 