public class Kinematics
A collection of methods for various kinematics-related tasks.
| Modifier and Type | Field and Description |
|---|---|
static Kinematics |
INSTANCE
A collection of methods for various kinematics-related tasks.
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<java.lang.Double> |
calculateMotorFeedforward(java.util.List<java.lang.Double> vels,
java.util.List<java.lang.Double> accels,
double kV,
double kA,
double kStatic)
Computes the motor feedforward (i.e., open loop powers) for the given set of coefficients.
|
static double |
calculateMotorFeedforward(double vel,
double accel,
double kV,
double kA,
double kStatic)
Computes the motor feedforward (i.e., open loop power) for the given set of coefficients.
|
static Pose2d |
calculatePoseError(Pose2d targetFieldPose,
Pose2d currentFieldPose)
Returns the error between
targetFieldPose and currentFieldPose. |
static Pose2d |
fieldToRobotAcceleration(Pose2d fieldPose,
Pose2d fieldVel,
Pose2d fieldAccel)
|
static Pose2d |
fieldToRobotVelocity(Pose2d fieldPose,
Pose2d fieldVel)
|
static Pose2d |
relativeOdometryUpdate(Pose2d fieldPose,
Pose2d robotPoseDelta)
Performs a relative odometry update. Note: this assumes that the robot moves with constant velocity over the
measurement interval.
|
public static Kinematics INSTANCE
A collection of methods for various kinematics-related tasks.
@JvmStatic @NotNull public static Pose2d fieldToRobotVelocity(@NotNull Pose2d fieldPose, @NotNull Pose2d fieldVel)
@JvmStatic @NotNull public static Pose2d fieldToRobotAcceleration(@NotNull Pose2d fieldPose, @NotNull Pose2d fieldVel, @NotNull Pose2d fieldAccel)
Returns the robot pose acceleration corresponding to fieldPose, fieldVel, and fieldAccel.
fieldPose,
fieldVel,
fieldAccel@JvmStatic @NotNull public static Pose2d calculatePoseError(@NotNull Pose2d targetFieldPose, @NotNull Pose2d currentFieldPose)
Returns the error between targetFieldPose and currentFieldPose.
targetFieldPose,
currentFieldPose@JvmStatic
@NotNull
public static java.util.List<java.lang.Double> calculateMotorFeedforward(@NotNull
java.util.List<java.lang.Double> vels,
@NotNull
java.util.List<java.lang.Double> accels,
double kV,
double kA,
double kStatic)
Computes the motor feedforward (i.e., open loop powers) for the given set of coefficients.
@JvmStatic
public static double calculateMotorFeedforward(double vel,
double accel,
double kV,
double kA,
double kStatic)
Computes the motor feedforward (i.e., open loop power) for the given set of coefficients.