Twist2d
Twist2d
represents a small motion delta in 2D space: a forward movement (dx), a sideways movement (dy), and a rotation (dtheta).
Why It's Useful
Twist2d
is used in the mathematical integration of motion, especially for differential and swerve drive odometry. It provides a way to accumulate small movement changes into a larger Pose2d
.
Common Use Cases
Odometry updates: Used by
SwerveDriveOdometry
to update robot pose based on wheel encoder and gyro changesSimulating movement: Represent small time-step changes in robot motion in simulation or trajectory generation
Kinematics math: Used in differential and swerve kinematics to compute relative motion between poses or track wheel motions
Twist2d is also the mathematical basis for exponential mapping and logarithmic mapping between poses, which is needed for robot localization.
Last updated