Package edu.wpi.first.math.geometry
Class Twist3d
java.lang.Object
edu.wpi.first.math.geometry.Twist3d
- All Implemented Interfaces:
ProtobufSerializable,StructSerializable,WPISerializable
A change in distance along a 3D arc since the last pose update. We can use ideas from
differential calculus to create new Pose3d objects from a Twist3d and vice versa.
A Twist can be used to represent a difference between two poses.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleLinear "dx" component.doubleLinear "dy" component.doubleLinear "dz" component.static final Twist3dProtoTwist3d protobuf for serialization.doubleRotation vector x component (radians).doubleRotation vector y component (radians).doubleRotation vector z component (radians).static final Twist3dStructTwist3d struct for serialization. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
dx
Linear "dx" component. -
dy
Linear "dy" component. -
dz
Linear "dz" component. -
rx
Rotation vector x component (radians). -
ry
Rotation vector y component (radians). -
rz
Rotation vector z component (radians). -
proto
Twist3d protobuf for serialization. -
struct
Twist3d struct for serialization.
-
-
Constructor Details
-
Twist3d
public Twist3d()Default constructor. -
Twist3d
Constructs a Twist3d with the given values.- Parameters:
dx- Change in x direction relative to robot.dy- Change in y direction relative to robot.dz- Change in z direction relative to robot.rx- Rotation vector x component.ry- Rotation vector y component.rz- Rotation vector z component.
-
-
Method Details
-
exp
Obtain a new Transform3d from a (constant curvature) velocity.See Controls Engineering in the FIRST Robotics Competition section 10.2 "Pose exponential" for a derivation.
The twist is a change in pose in the robot's coordinate frame since the previous pose update. When the user runs exp() on the twist, the user will receive the pose delta.
"Exp" represents the pose exponential, which is solving a differential equation moving the pose forward in time.
- Returns:
- The pose delta of the robot.
-
toString
-
equals
Checks equality between this Twist3d and another object. -
hashCode
-