MecanumDriveOdometry

class wpimath.kinematics.MecanumDriveOdometry(kinematics: wpimath.kinematics._kinematics.MecanumDriveKinematics, gyroAngle: wpimath.geometry._geometry.Rotation2d, wheelPositions: wpimath.kinematics._kinematics.MecanumDriveWheelPositions, initialPose: wpimath.geometry._geometry.Pose2d = Pose2d(Translation2d(x=0.000000, y=0.000000), Rotation2d(0.000000)))

Bases: MecanumDriveOdometryBase

Class for mecanum drive odometry. Odometry allows you to track the robot’s position on the field over a course of a match using readings from your mecanum wheel encoders.

Teams can use odometry during the autonomous period for complex tasks like path following. Furthermore, odometry can be used for latency compensation when using computer-vision systems.

Constructs a MecanumDriveOdometry object.

Parameters:
  • kinematics – The mecanum drive kinematics for your drivetrain.

  • gyroAngle – The angle reported by the gyroscope.

  • wheelPositions – The current distances measured by each wheel.

  • initialPose – The starting position of the robot on the field.