object Kinematics
A collection of methods for various kinematics-related tasks.
fun calculateMotorFeedforward(velocities: List<Double>, accelerations: List<Double>, kV: Double, kA: Double, kStatic: Double): List<Double>
Computes the motor feedforwards (i.e., open loop powers) for the given set of coefficients. fun calculateMotorFeedforward(velocity: Double, acceleration: Double, kV: Double, kA: Double, kStatic: Double): Double
Computes the motor feedforward (i.e., open loop power) for the given set of coefficients. |
|
fun calculatePoseError(targetFieldPose: Pose2d, actualFieldPose: Pose2d): Pose2d
Returns the error between targetFieldPose and actualFieldPose. |
|
fun fieldToRobotPose(fieldPose: Pose2d): Pose2d
Returns the robot pose corresponding to fieldPose. |
|
fun fieldToRobotPoseAcceleration(fieldPose: Pose2d, fieldPoseVelocity: Pose2d, fieldPoseAcceleration: Pose2d): Pose2d
Returns the robot pose acceleration corresponding to fieldPose, fieldPoseVelocity, and fieldPoseAcceleration. |
|
fun fieldToRobotPoseVelocity(fieldPose: Pose2d, fieldPoseVelocity: Pose2d): Pose2d
Returns the robot pose velocity corresponding to fieldPose and fieldPoseVelocity. |
|
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. |