Kinematics

object Kinematics

A collection of methods for various kinematics-related tasks.

Functions

Link copied to clipboard
fun calculateFieldPoseError(targetFieldPose: Pose2d, currentFieldPose: Pose2d): Pose2d

Returns the error between targetFieldPose and currentFieldPose in the field frame.

Link copied to clipboard
fun calculateRobotPoseError(targetFieldPose: Pose2d, currentFieldPose: Pose2d): Pose2d

Returns the error between targetFieldPose and currentFieldPose in the robot frame.

Link copied to clipboard
fun fieldToRobotAcceleration(fieldPose: Pose2d, fieldVel: Pose2d, fieldAccel: Pose2d): Pose2d

Returns the robot pose acceleration corresponding to fieldPose, fieldVel, and fieldAccel.

Link copied to clipboard
fun fieldToRobotVelocity(fieldPose: Pose2d, fieldVel: Pose2d): Pose2d

Returns the robot pose velocity corresponding to fieldPose and fieldVel.

Link copied to clipboard
fun relativeOdometryUpdate(fieldPose: Pose2d, robotPoseDelta: Pose2d): Pose2d

Performs a relative odometry update. Note: this assumes that the robot moves with constant velocity over the measurement interval.