Class Twist2d

java.lang.Object
edu.wpi.first.math.geometry.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 Summary

    Fields 
    Modifier and Type Field Description
    double dtheta
    Angular "dtheta" component (radians).
    double dx
    Linear "dx" component.
    double dy
    Linear "dy" component.
  • Constructor Summary

    Constructors 
    Constructor Description
    Twist2d()  
    Twist2d​(double dx, double dy, double dtheta)
    Constructs a Twist2d with the given values.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(Object obj)
    Checks equality between this Twist2d and another object.
    int hashCode()  
    String toString()  

    Methods inherited from class java.lang.Object

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

    • dx

      public double dx
      Linear "dx" component.
    • dy

      public double dy
      Linear "dy" component.
    • dtheta

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

    • Twist2d

      public Twist2d()
    • Twist2d

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