object Kinematics
A collection of methods for various kinematics-related tasks.
fun calculateMotorFeedforward(vels: List<Double>, accels: List<Double>, kV: Double, kA: Double, kStatic: Double): List<Double>
Computes the motor feedforward (i.e., open loop powers) for the given set of coefficients. fun calculateMotorFeedforward(vel: Double, accel: 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, currentFieldPose: Pose2d): Pose2d
Returns the error between targetFieldPose and currentFieldPose. |
|
fun fieldToRobotAcceleration(fieldPose: Pose2d, fieldVel: Pose2d, fieldAccel: Pose2d): Pose2d
Returns the robot pose acceleration corresponding to fieldPose, fieldVel, and fieldAccel. |
|
fun fieldToRobotVelocity(fieldPose: Pose2d, fieldVel: Pose2d): Pose2d
Returns the robot pose velocity corresponding to fieldPose and fieldVel. |
|
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. |