Class Pose

java.lang.Object
org.opentcs.data.model.Pose
All Implemented Interfaces:
java.io.Serializable

public class Pose
extends java.lang.Object
implements java.io.Serializable
A pose consisting of a position and an orientation angle.
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    Pose​(Triple position, double orientationAngle)
    Creates a new instance.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    double getOrientationAngle()
    The orientation angle in degrees (-360..360).
    Triple getPosition()
    The position/coordinates in mm.
    int hashCode()  
    java.lang.String toString()  
    Pose withOrientationAngle​(double orientationAngle)
    Creates a copy of this object, with the given orientation angle.
    Pose withPosition​(Triple position)
    Creates a copy of this object, with the given position.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Pose

      public Pose​(@Nonnull Triple position, double orientationAngle)
      Creates a new instance.
      Parameters:
      position - The position/coordinates in mm.
      orientationAngle - The orientation angle in degrees (-360..360). May be Double.NaN if unknown/undefined.
  • Method Details

    • getPosition

      @Nonnull public Triple getPosition()
      The position/coordinates in mm.
      Returns:
      The position/coordinates in mm.
    • withPosition

      public Pose withPosition​(@Nonnull Triple position)
      Creates a copy of this object, with the given position.
      Parameters:
      position - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getOrientationAngle

      public double getOrientationAngle()
      The orientation angle in degrees (-360..360). May be Double.NaN if unknown/undefined.
      Returns:
      The orientation angle in degrees, or Double.NaN.
    • withOrientationAngle

      public Pose withOrientationAngle​(double orientationAngle)
      Creates a copy of this object, with the given orientation angle.
      Parameters:
      orientationAngle - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • toString

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