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> velocities,
java.util.List<java.lang.Double> accelerations,
double kV,
double kA,
double kStatic)
Computes the motor feedforwards (i.e., open loop powers) for the given set of coefficients.
|
static double |
calculateMotorFeedforward(double velocity,
double acceleration,
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 actualFieldPose)
Returns the error between targetFieldPose and actualFieldPose.
|
static Pose2d |
fieldToRobotPose(Pose2d fieldPose)
Returns the robot pose corresponding to fieldPose.
|
static Pose2d |
fieldToRobotPoseAcceleration(Pose2d fieldPose,
Pose2d fieldPoseVelocity,
Pose2d fieldPoseAcceleration)
Returns the robot pose acceleration corresponding to fieldPose, fieldPoseVelocity, and fieldPoseAcceleration.
|
static Pose2d |
fieldToRobotPoseVelocity(Pose2d fieldPose,
Pose2d fieldPoseVelocity)
Returns the robot pose velocity corresponding to fieldPose and fieldPoseVelocity.
|
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.
public static Pose2d fieldToRobotPose(Pose2d fieldPose)
Returns the robot pose corresponding to fieldPose.
public static Pose2d fieldToRobotPoseVelocity(Pose2d fieldPose, Pose2d fieldPoseVelocity)
Returns the robot pose velocity corresponding to fieldPose and fieldPoseVelocity.
public static Pose2d fieldToRobotPoseAcceleration(Pose2d fieldPose, Pose2d fieldPoseVelocity, Pose2d fieldPoseAcceleration)
Returns the robot pose acceleration corresponding to fieldPose, fieldPoseVelocity, and fieldPoseAcceleration.
public static Pose2d calculatePoseError(Pose2d targetFieldPose, Pose2d actualFieldPose)
Returns the error between targetFieldPose and actualFieldPose.
public static java.util.List<java.lang.Double> calculateMotorFeedforward(java.util.List<java.lang.Double> velocities,
java.util.List<java.lang.Double> accelerations,
double kV,
double kA,
double kStatic)
Computes the motor feedforwards (i.e., open loop powers) for the given set of coefficients.
public static double calculateMotorFeedforward(double velocity,
double acceleration,
double kV,
double kA,
double kStatic)
Computes the motor feedforward (i.e., open loop power) for the given set of coefficients.