[robotpy] Mirror most other subprojects (#8208)

GitOrigin-RevId: ac60fd3cf4a24023184376687da28373d14b781a

This mirrors the robotpy files for the following projects:
- apriltag
- datalog
- hal
- ntcore
- romiVendordep
- wpilibc
- wpimath
- xrpVendordep

This excludes cscore and the halsim wrappers for at this time.

NOTE: This does not hook these projects up to the build system, just simply mirrors the files. The building will take place in a follow up PR to make it easier to review the changes necessary to build.
This commit is contained in:
PJ Reiniger
2025-10-24 01:28:04 -04:00
committed by GitHub
parent 8992dcdc99
commit 44b9cc1398
545 changed files with 27293 additions and 38 deletions

View File

@@ -0,0 +1,48 @@
defaults:
subpackage: estimator
classes:
frc::DifferentialDrivePoseEstimator:
force_no_trampoline: true
doc: |
This class wraps an Unscented Kalman Filter to fuse latency-compensated
vision measurements with differential drive encoder measurements. It will
correct for noisy vision measurements and encoder drift. It is intended to be
an easy drop-in for :class:`DifferentialDriveOdometry`. In fact, if you never call
:meth:`addVisionMeasurement`, and only call :meth:`update`, this will behave exactly the
same as DifferentialDriveOdometry.
:meth:`update` should be called every robot loop (if your robot loops are faster or
slower than the default, then you should change the nominal delta time via
the constructor).
:meth:`addVisionMeasurement` can be called as infrequently as you want; if you
never call it, then this class will behave like regular encoder odometry.
The state-space system used internally has the following states (x), inputs
(u), and outputs (y):
:math:`x = [x, y, \theta, dist_l, dist_r]^T` in the field coordinate
system containing x position, y position, heading, left encoder distance,
and right encoder distance.
:math:`u = [v_l, v_r, d\theta]^T` containing left wheel velocity,
right wheel velocity, and change in gyro heading.
NB: Using velocities make things considerably easier, because it means that
teams don't have to worry about getting an accurate model. Basically, we
suspect that it's easier for teams to get good encoder data than it is for
them to perform system identification well enough to get a good model.
:math:`y = [x, y, \theta]^T` from vision containing x position, y
position, and heading; or :math:`y = [dist_l, dist_r, \theta]^T`
containing left encoder position, right encoder position, and gyro heading.
methods:
DifferentialDrivePoseEstimator:
overloads:
DifferentialDriveKinematics&, const Rotation2d&, units::meter_t, units::meter_t, const Pose2d&:
? DifferentialDriveKinematics&, const Rotation2d&, units::meter_t, units::meter_t, const Pose2d&, const wpi::array<double, 3>&, const wpi::array<double, 3>&
:
ResetPosition:
Update:
UpdateWithTime: