WPILibC++ 2024.3.2
|
Class for mecanum drive odometry. More...
#include <frc/kinematics/MecanumDriveOdometry.h>
Public Member Functions | |
MecanumDriveOdometry (MecanumDriveKinematics kinematics, const Rotation2d &gyroAngle, const MecanumDriveWheelPositions &wheelPositions, const Pose2d &initialPose=Pose2d{}) | |
Constructs a MecanumDriveOdometry object. More... | |
Public Member Functions inherited from frc::Odometry< MecanumDriveWheelSpeeds, MecanumDriveWheelPositions > | |
Odometry (const Kinematics< MecanumDriveWheelSpeeds, WheelPositions > &kinematics, const Rotation2d &gyroAngle, const WheelPositions &wheelPositions, const Pose2d &initialPose=Pose2d{}) | |
Constructs an Odometry object. More... | |
void | ResetPosition (const Rotation2d &gyroAngle, const WheelPositions &wheelPositions, const Pose2d &pose) |
Resets the robot's position on the field. More... | |
const Pose2d & | GetPose () const |
Returns the position of the robot on the field. More... | |
const Pose2d & | Update (const Rotation2d &gyroAngle, const WheelPositions &wheelPositions) |
Updates the robot's position on the field using forward kinematics and integration of the pose over time. More... | |
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.
|
explicit |
Constructs a MecanumDriveOdometry object.
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. |