Twist2d
- class wpimath.Twist2d(dx: wpimath.units.meters = 0, dy: wpimath.units.meters = 0, dtheta: wpimath.units.radians = 0)
Bases:
pybind11_objectA change in distance along a 2D arc since the last pose update. We can use ideas from differential calculus to create new Pose2ds from a Twist2d and vice versa.
A Twist can be used to represent a difference between two poses.
- WPIStruct = <capsule object "WPyStruct">
- property dtheta_degrees
- property dx_feet
- property dy_feet
- exp() wpimath._wpimath.Transform2d
Obtain a new Transform2d from a (constant curvature) velocity.
See “https://file.tavsys.net/control/controls-engineering-in-frc.pdf” Controls Engineering in the FIRST Robotics Competition</a> 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.
- static fromFeet(dx: wpimath.units.feet = 0, dy: wpimath.units.feet = 0, dtheta: wpimath.units.radians = 0) wpimath._wpimath.Twist2d