Class Twist2d

  • public class Twist2d
    extends Object
    A change in distance along arc since the last pose update. We can use ideas from differential calculus to create new Pose2ds from a Twist2d and vise versa.

    A Twist can be used to represent a difference between two poses.

    • Field Detail

      • dx

        public double dx
        Linear "dx" component.
      • dy

        public double dy
        Linear "dy" component.
      • dtheta

        public double dtheta
        Angular "dtheta" component (radians).
    • Constructor Detail

      • Twist2d

        public Twist2d()
      • Twist2d

        public Twist2d​(double dx,
                       double dy,
                       double dtheta)
        Constructs a Twist2d with the given values.
        dx - Change in x direction relative to robot.
        dy - Change in y direction relative to robot.
        dtheta - Change in angle relative to robot.
    • Method Detail

      • equals

        public boolean equals​(Object obj)
        Checks equality between this Twist2d and another object.
        equals in class Object
        obj - The other object.
        Whether the two objects are equal or not.
      • hashCode

        public int hashCode()
        hashCode in class Object