us.ihmc.utilities.screwTheory
Class Wrench

java.lang.Object
  extended by us.ihmc.utilities.screwTheory.SpatialForceVector
      extended by us.ihmc.utilities.screwTheory.Wrench

public class Wrench
extends SpatialForceVector


Field Summary
 
Fields inherited from class us.ihmc.utilities.screwTheory.SpatialForceVector
AXIS_NAMES, SIZE
 
Constructor Summary
Wrench()
          Default constructor.
Wrench(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame)
          Initializes the components of the wrench to zero
Wrench(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, org.ejml.data.DenseMatrix64F wrench)
          Construct using a Matrix ([torque; force])
Wrench(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, double[] wrench)
          Construct using a double array ([torque; force])
Wrench(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, javax.vecmath.Vector3d force, javax.vecmath.Vector3d torque)
           
Wrench(Wrench other)
          Copy constructor
 
Method Summary
 void add(Wrench other)
          Adds another wrench to this one, after performing some reference frame checks.
 void changeBodyFrameAttachedToSameBody(ReferenceFrame bodyFrame)
           
 void checkAndSet(Wrench other)
           
 double dot(Twist twist)
          Takes the dot product of this wrench and a twist, resulting in the (reference frame independent) instantaneous power.
 ReferenceFrame getBodyFrame()
           
 double getLinearPartX()
           
 double getLinearPartY()
           
 double getLinearPartZ()
           
 void set(Wrench other)
           
 void setToZero(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame)
           
 void sub(Wrench other)
          Subtracts another wrench from this one, after performing some reference frame checks.
 java.lang.String toString()
           
 
Methods inherited from class us.ihmc.utilities.screwTheory.SpatialForceVector
add, addAngularPart, addLinearPart, changeFrame, checkAndSet, createUsingArm, getAngularPartAsFrameVectorCopy, getAngularPartCopy, getExpressedInFrame, getLinearPartAsFrameVectorCopy, getLinearPartCopy, negate, packAngularPart, packAngularPart, packLinearPart, packLinearPart, packMatrix, packMatrix, packMatrixColumn, scale, scaleAngularPart, scaleLinearPart, set, set, set, set, setAngularPart, setAngularPartX, setAngularPartY, setAngularPartZ, setLinearPart, setLinearPartX, setLinearPartY, setLinearPartZ, setToZero, setUsingArm, sub, subAngularPart, subLinearPart, times, toDenseMatrix
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Wrench

public Wrench(ReferenceFrame bodyFrame,
              ReferenceFrame expressedInFrame)
Initializes the components of the wrench to zero

Parameters:
bodyFrame - the frame/body on which the wrench is exerted
expressedInFrame - the frame in which the wrench is expressed

Wrench

public Wrench(ReferenceFrame bodyFrame,
              ReferenceFrame expressedInFrame,
              javax.vecmath.Vector3d force,
              javax.vecmath.Vector3d torque)
Parameters:
bodyFrame - the frame/body on which the wrench is exerted
expressedInFrame - the frame in which the wrench is expressed
force - force part of the wrench
torque - torque part of the wrench

Wrench

public Wrench(ReferenceFrame bodyFrame,
              ReferenceFrame expressedInFrame,
              org.ejml.data.DenseMatrix64F wrench)
Construct using a Matrix ([torque; force])


Wrench

public Wrench(ReferenceFrame bodyFrame,
              ReferenceFrame expressedInFrame,
              double[] wrench)
Construct using a double array ([torque; force])


Wrench

public Wrench(Wrench other)
Copy constructor


Wrench

public Wrench()
Default constructor. Sets reference frames to null and angular and linear parts to zero.

Method Detail

getBodyFrame

public ReferenceFrame getBodyFrame()
Returns:
the frame/body *on which* this wrench is exerted

checkAndSet

public void checkAndSet(Wrench other)

set

public void set(Wrench other)

setToZero

public void setToZero(ReferenceFrame bodyFrame,
                      ReferenceFrame expressedInFrame)

add

public void add(Wrench other)
Adds another wrench to this one, after performing some reference frame checks.


sub

public void sub(Wrench other)
Subtracts another wrench from this one, after performing some reference frame checks.


changeBodyFrameAttachedToSameBody

public void changeBodyFrameAttachedToSameBody(ReferenceFrame bodyFrame)

dot

public double dot(Twist twist)
Takes the dot product of this wrench and a twist, resulting in the (reference frame independent) instantaneous power.

Parameters:
twist - a twist that 1) has an 'ofWhat' reference frame that is the same as this wrench's 'bodyFrame' reference frame. 2) is expressed in the same reference frame as this wrench
Returns:
the instantaneous power associated with this wrench and the twist

toString

public java.lang.String toString()
Overrides:
toString in class SpatialForceVector

getLinearPartX

public double getLinearPartX()

getLinearPartY

public double getLinearPartY()

getLinearPartZ

public double getLinearPartZ()