55 const Pose2d& initialPose);
134 units::second_t timestamp);
165 const Pose2d& visionRobotPose, units::second_t timestamp,
167 SetVisionMeasurementStdDevs(visionMeasurementStdDevs);
168 AddVisionMeasurement(visionRobotPose, timestamp);
196 struct InterpolationRecord {
212 bool operator==(
const InterpolationRecord& other)
const =
default;
220 bool operator!=(
const InterpolationRecord& other)
const =
default;
231 InterpolationRecord endValue,
235 static constexpr units::second_t kBufferDuration = 1.5_s;
240 Eigen::Matrix3d m_visionK = Eigen::Matrix3d::Zero();
242 TimeInterpolatableBuffer<InterpolationRecord> m_poseBuffer{
243 kBufferDuration, [
this](
const InterpolationRecord& start,
244 const InterpolationRecord&
end,
double t) {
245 return start.Interpolate(this->m_kinematics,
end, t);
#define WPILIB_DLLEXPORT
Definition: SymbolExports.h:36
Helper class that converts a chassis velocity (dx, dy, and dtheta components) into individual wheel s...
Definition: MecanumDriveKinematics.h:42
Class for mecanum drive odometry.
Definition: MecanumDriveOdometry.h:26
This class wraps Mecanum Drive Odometry to fuse latency-compensated vision measurements with mecanum ...
Definition: MecanumDrivePoseEstimator.h:35
void SetVisionMeasurementStdDevs(const wpi::array< double, 3 > &visionMeasurementStdDevs)
Sets the pose estimator's trust in vision measurements.
void AddVisionMeasurement(const Pose2d &visionRobotPose, units::second_t timestamp, const wpi::array< double, 3 > &visionMeasurementStdDevs)
Adds a vision measurement to the Kalman Filter.
Definition: MecanumDrivePoseEstimator.h:164
Pose2d UpdateWithTime(units::second_t currentTime, const Rotation2d &gyroAngle, const MecanumDriveWheelPositions &wheelPositions)
Updates the pose estimator with wheel encoder and gyro information.
Pose2d GetEstimatedPosition() const
Gets the estimated robot pose.
MecanumDrivePoseEstimator(MecanumDriveKinematics &kinematics, const Rotation2d &gyroAngle, const MecanumDriveWheelPositions &wheelPositions, const Pose2d &initialPose)
Constructs a MecanumDrivePoseEstimator with default standard deviations for the model and vision meas...
void AddVisionMeasurement(const Pose2d &visionRobotPose, units::second_t timestamp)
Add a vision measurement to the Kalman Filter.
Pose2d Update(const Rotation2d &gyroAngle, const MecanumDriveWheelPositions &wheelPositions)
Updates the pose estimator with wheel encoder and gyro information.
MecanumDrivePoseEstimator(MecanumDriveKinematics &kinematics, const Rotation2d &gyroAngle, const MecanumDriveWheelPositions &wheelPositions, const Pose2d &initialPose, const wpi::array< double, 3 > &stateStdDevs, const wpi::array< double, 3 > &visionMeasurementStdDevs)
Constructs a MecanumDrivePoseEstimator.
void ResetPosition(const Rotation2d &gyroAngle, const MecanumDriveWheelPositions &wheelPositions, const Pose2d &pose)
Resets the robot's position on the field.
Represents a 2D pose containing translational and rotational elements.
Definition: Pose2d.h:25
A rotation in a 2D coordinate frame represented by a point on the unit circle (cosine and sine).
Definition: Rotation2d.h:26
static EIGEN_DEPRECATED const end_t end
Definition: IndexedViewHelper.h:181
Definition: AprilTagFieldLayout.h:22
bool operator==(const Value &lhs, const Value &rhs)
constexpr bool operator!=(const UNIT_LIB_DEFAULT_TYPE lhs, const Units &rhs) noexcept
Definition: base.h:2716
constexpr empty_array_t empty_array
Definition: array.h:15
Represents the wheel speeds for a mecanum drive drivetrain.
Definition: MecanumDriveWheelPositions.h:15