ChassisAccelerations
- class wpimath.ChassisAccelerations(ax: wpimath.units.meters_per_second_squared = 0, ay: wpimath.units.meters_per_second_squared = 0, alpha: wpimath.units.radians_per_second_squared = 0)
Bases:
pybind11_objectRepresents robot chassis accelerations.
A strictly non-holonomic drivetrain, such as a differential drive, should never have an ay component because it can never move sideways. Holonomic drivetrains such as swerve and mecanum will often have all three components.
- WPIStruct = <capsule object "WPyStruct">
- property alpha_dpss
- property ax_fpss
- property ay_fpss
- static fromFps(ax: wpimath.units.feet_per_second_squared = 0, ay: wpimath.units.feet_per_second_squared = 0, alpha: wpimath.units.radians_per_second_squared = 0) wpimath._wpimath.ChassisAccelerations
- toFieldRelative(robotAngle: wpimath._wpimath.Rotation2d) wpimath._wpimath.ChassisAccelerations
Converts this robot-relative set of accelerations into a field-relative ChassisAccelerations object.
- Parameters:
robotAngle – The angle of the robot as measured by a gyroscope. The robot’s angle is considered to be zero when it is facing directly away from your alliance station wall. Remember that this should be CCW positive.
- Returns:
ChassisAccelerations object representing the accelerations in the field’s frame of reference.
- toRobotRelative(robotAngle: wpimath._wpimath.Rotation2d) wpimath._wpimath.ChassisAccelerations
Converts this field-relative set of accelerations into a robot-relative ChassisAccelerations object.
- Parameters:
robotAngle – The angle of the robot as measured by a gyroscope. The robot’s angle is considered to be zero when it is facing directly away from your alliance station wall. Remember that this should be CCW positive.
- Returns:
ChassisAccelerations object representing the accelerations in the robot’s frame of reference.