mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[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:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user