[py] Add wpimath/kinematics tests (#8461)

Used Gemini to convert the C++ tests in wpimath/.../kinematics to
pytest. For ease of use required a better constructor for
`MecanumDriveWheelPositions`

I did this conversion months ago (before robotpy landed and before the
reorg), so new tests might be missing. At least its better than nothing
🤷

Broke the huge pr that does almost everything into parts so its easier
to review.

---------

Co-authored-by: David Vo <auscompgeek@users.noreply.github.com>
This commit is contained in:
PJ Reiniger
2026-01-12 22:14:14 -05:00
committed by GitHub
parent c2b339cfc9
commit eccc2301ac
15 changed files with 2061 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
classes:
wpi::math::MecanumDriveWheelPositions:
force_no_default_constructor: true
attributes:
frontLeft:
frontRight:
@@ -8,3 +9,10 @@ classes:
methods:
operator==:
Interpolate:
inline_code: |
.def(
py::init<
wpi::units::meter_t, wpi::units::meter_t, wpi::units::meter_t, wpi::units::meter_t
>(),
py::arg("frontLeft") = 0, py::arg("frontRight") = 0, py::arg("rearLeft") = 0, py::arg("rearRight") = 0
)