Class MPose

java.lang.Object
edu.tufts.hrilab.mtracs.util.MPose
All Implemented Interfaces:
Serializable

public class MPose extends Object implements Serializable
MPose represents one robot End Effector pose, including all the information required for pose representation on an CR800 controller, as well as associated metadata for TRACS.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected float
     
    protected float
     
    protected float
     
    protected float
     
    protected float
     
    protected long
     
    protected long
     
    protected float
     
    protected float
     
    protected float
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an empty MPose.
    MPose(float x, float y, float z, float a, float b, float c)
    Constructs an MPose from the given parameters.
    Constructs an MPose as a shallow copy of the given MPoseGson.
    MPose(MPose other)
    Constructs an MPose as a shallow copy of the given MPose.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(MPose other)
    Adjusts this MPose by vector adding it to the given MPose
    float
    Gets the a rotation of this pose.
    float
    Gets the b rotation of this pose.
    float
    Gets the c rotation of this pose.
     
    float
    Gets the L1 value of this pose.
    float
    Gets the L2 value of this pose.
    javax.vecmath.Point3d
    Gets the just the representation of this MPose's orientation in radians (ABC format)
    long
    Gets the S1 value of this pose.
    long
    Gets the S2 value of this pose.
    float
    Gets the surface height associated with this pose.
    javax.vecmath.Point3d
    Gets the just the representation of this MPose's translation in meters
     
    float
    Fetches the x value of this pose.
    float
    Fetches the x value of this pose.
    float
    Fetches the y value of this pose.
    float
    Fetches the y value of this pose.
    float
    Fetches the z value of this pose.
    float
    Fetches the z value of this pose.
    void
    setA(float a)
    Sets the a rotation of this pose.
    void
    setB(float b)
    Sets the b rotation of this pose.
    void
    setC(float c)
    Sets the c rotation of this pose.
    void
    setL1(float l1)
    Sets the L1 value of this pose.
    void
    setL2(float l2)
    Sets the L2 value of this pose.
    void
    setOrientation(javax.vecmath.Point3d o)
    Sets the just the representation of this MPose's orientation in radians (ABC format)
    void
    setOrientation(javax.vecmath.Quat4d q)
    Sets the just the representation of this MPose's orientation as a quaternion
    void
    setS1(long s1)
    Sets the S1 value of this pose.
    void
    setS2(long s2)
    Sets the S2 value of this pose.
    void
    setSurfaceHeight(float surfaceHeight)
    Sets the surface height associated with this pose.
    void
    setTranslation(javax.vecmath.Point3d t)
    Sets the just the representation of this MPose's translation in meters
    void
    setX(float x)
    Sets the x value of this pose.
    void
    setXMeters(float x)
    Sets the x value of this pose.
    void
    setY(float y)
    Sets the y value of this pose.
    void
    setYMeters(float y)
    Sets the y value of this pose.
    void
    setZ(float z)
    Sets the z value of this pose.
    void
    setZMeters(float z)
    Sets the z value of this pose.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • x

      protected float x
    • y

      protected float y
    • z

      protected float z
    • a

      protected float a
    • b

      protected float b
    • c

      protected float c
    • l1

      protected float l1
    • l2

      protected float l2
    • s1

      protected long s1
    • s2

      protected long s2
  • Constructor Details

    • MPose

      public MPose(float x, float y, float z, float a, float b, float c)
      Constructs an MPose from the given parameters.
      Parameters:
      x - The x value of the pose in millimeters.
      y - The y value of the pose in millimeters.
      z - The z value of the pose in millimeters.
      a - The a rotation of the pose in radians.
      b - The b rotation of the pose in radians.
      c - The c rotation of the pose in radians.
    • MPose

      public MPose()
      Constructs an empty MPose.
    • MPose

      public MPose(MPose other)
      Constructs an MPose as a shallow copy of the given MPose.
      Parameters:
      other - The MPose to construct a copy of.
    • MPose

      public MPose(MPoseGson other)
      Constructs an MPose as a shallow copy of the given MPoseGson.
      Parameters:
      other - The MPose to construct a copy of.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • add

      public void add(MPose other)
      Adjusts this MPose by vector adding it to the given MPose
      Parameters:
      other - The pose values to add to this MPose as a MPose
    • getTranslation

      public javax.vecmath.Point3d getTranslation()
      Gets the just the representation of this MPose's translation in meters
      Returns:
      The Point3d representation of this pose's translation
    • getOrientation

      public javax.vecmath.Point3d getOrientation()
      Gets the just the representation of this MPose's orientation in radians (ABC format)
      Returns:
      The Point3d representation of this pose's orientation
    • setTranslation

      public void setTranslation(javax.vecmath.Point3d t)
      Sets the just the representation of this MPose's translation in meters
      Parameters:
      t - The translation to set as a Point3d
    • setOrientation

      public void setOrientation(javax.vecmath.Point3d o)
      Sets the just the representation of this MPose's orientation in radians (ABC format)
      Parameters:
      o - The orientation to set as a Point3d
    • setOrientation

      public void setOrientation(javax.vecmath.Quat4d q)
      Sets the just the representation of this MPose's orientation as a quaternion
      Parameters:
      q - The orientation to set as a Quat4d
    • getX

      public float getX()
      Fetches the x value of this pose.
      Returns:
      The x value of this pose in millimeters.
    • getXMeters

      public float getXMeters()
      Fetches the x value of this pose.
      Returns:
      The x value of this pose in meters.
    • setX

      public void setX(float x)
      Sets the x value of this pose.
      Parameters:
      x - The x value to set in millimeters.
    • setXMeters

      public void setXMeters(float x)
      Sets the x value of this pose.
      Parameters:
      x - The x value to set in meters.
    • getY

      public float getY()
      Fetches the y value of this pose.
      Returns:
      The y value of this pose in millimeters.
    • getYMeters

      public float getYMeters()
      Fetches the y value of this pose.
      Returns:
      The y value of this pose in meters.
    • setY

      public void setY(float y)
      Sets the y value of this pose.
      Parameters:
      y - The y value to set in millimeters.
    • setYMeters

      public void setYMeters(float y)
      Sets the y value of this pose.
      Parameters:
      y - The y value to set in meters.
    • getZ

      public float getZ()
      Fetches the z value of this pose.
      Returns:
      The z value of this pose in millimeters.
    • getZMeters

      public float getZMeters()
      Fetches the z value of this pose.
      Returns:
      The z value of this pose in meters.
    • setZ

      public void setZ(float z)
      Sets the z value of this pose.
      Parameters:
      z - The z value to set in millimeters.
    • setZMeters

      public void setZMeters(float z)
      Sets the z value of this pose.
      Parameters:
      z - The z value to set in meters.
    • getA

      public float getA()
      Gets the a rotation of this pose.
      Returns:
      The a rotation of this pose in radians.
    • setA

      public void setA(float a)
      Sets the a rotation of this pose.
      Parameters:
      a - The a rotation to set in radians.
    • getB

      public float getB()
      Gets the b rotation of this pose.
      Returns:
      The b rotation of this pose in radians.
    • setB

      public void setB(float b)
      Sets the b rotation of this pose.
      Parameters:
      b - The b rotation to set in radians.
    • getC

      public float getC()
      Gets the c rotation of this pose.
      Returns:
      The c rotation of this pose in radians.
    • setC

      public void setC(float c)
      Sets the c rotation of this pose.
      Parameters:
      c - The c rotation to set in radians.
    • getL1

      public float getL1()
      Gets the L1 value of this pose.
      Returns:
      The L1 value of this pose as a float.
    • setL1

      public void setL1(float l1)
      Sets the L1 value of this pose.
      Parameters:
      l1 - The L1 value to set as a float.
    • getL2

      public float getL2()
      Gets the L2 value of this pose.
      Returns:
      The L2 value of this pose as a float.
    • setL2

      public void setL2(float l2)
      Sets the L2 value of this pose.
      Parameters:
      l2 - The L2 value to set as a float.
    • getS1

      public long getS1()
      Gets the S1 value of this pose.
      Returns:
      The S1 value of this pose as a float.
    • setS1

      public void setS1(long s1)
      Sets the S1 value of this pose.
      Parameters:
      s1 - The S1 value to set as a float.
    • getS2

      public long getS2()
      Gets the S2 value of this pose.
      Returns:
      The S2 value of this pose as a float.
    • setS2

      public void setS2(long s2)
      Sets the S2 value of this pose.
      Parameters:
      s2 - The S2 value to set as a float.
    • getSurfaceHeight

      public float getSurfaceHeight()
      Gets the surface height associated with this pose.
      Returns:
      The surface height associated with this pose in millimeters.
    • setSurfaceHeight

      public void setSurfaceHeight(float surfaceHeight)
      Sets the surface height associated with this pose.
      Parameters:
      surfaceHeight - The surface height to be associated with this pose in millimeters.
    • getVerticalApproachPose

      public MPose getVerticalApproachPose()
    • getHorizontalApproachPose

      public MPose getHorizontalApproachPose()