Package edu.wpi.first.math.geometry
Class Twist2d
java.lang.Object
edu.wpi.first.math.geometry.Twist2d
- All Implemented Interfaces:
ProtobufSerializable
,StructSerializable
,WPISerializable
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
Modifier and TypeFieldDescriptiondouble
Angular "dtheta" component (radians).double
Linear "dx" component.double
Linear "dy" component.static final Twist2dProto
Twist2d protobuf for serialization.static final Twist2dStruct
Twist2d struct for serialization. -
Constructor Summary
-
Method Summary
-
Field Details
-
dx
Linear "dx" component. -
dy
Linear "dy" component. -
dtheta
Angular "dtheta" component (radians). -
proto
Twist2d protobuf for serialization. -
struct
Twist2d struct for serialization.
-
-
Constructor Details
-
Twist2d
public Twist2d()Default constructor. -
Twist2d
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