Class Twist2d

java.lang.Object
edu.wpi.first.math.geometry.Twist2d
All Implemented Interfaces:
ProtobufSerializable, StructSerializable, WPISerializable

public class Twist2d
extends Object
implements ProtobufSerializable, StructSerializable
A change in distance along a 2D arc since the last pose update. We can use ideas from differential calculus to create new Pose2d objects from a Twist2d and vice 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.
    static Twist2dProto proto
    Twist2d protobuf for serialization.
    static Twist2dStruct struct
    Twist2d struct for serialization.
  • Constructor Summary

    Constructors 
    Constructor Description
    Twist2d()
    Default constructor.
    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

  • Constructor Details

    • Twist2d

      public Twist2d()
      Default constructor.
    • 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