`EKF.py` (1617 lines, 39 methods) has zero live tests -- every EKF test in `test_mobile.py` (`DeadReckoning_test`, `MapLocalization_test`, `Mapping_test`, `SLAM_test`, `ParticleFilter_test`) is commented out and is unconverted MATLAB syntax (`randinit`, `tc.TestData.Duration`, `veh.add_driver`, `numcols`) -- never ported when this was ported from the MATLAB toolbox.
`sensors.py`'s `SensorBase` has no standalone test either, only indirect exercise via `RangeBearingSensor`'s 3 tests (`test_init`, `test_reading`, `test_h`). Untested: the `_animate`/plotting branch, `range`/`angle` field-of-view filtering, and the `fail`-window simulated-failure option.
This gap is exactly why two kwarg renames on these code paths went unnoticed for years: `Bicycle`'s `vlim`/`slim` -> `speed_max`/`steer_max` (2021, fixed in #596) and `SensorBase`'s `animate` -> `plot` (2023) -- both broke the RVC3 book's own example notebooks with no test catching either.
Proper fix: port the five commented-out MATLAB test stubs to real pytest tests exercising `EKF.run()` end-to-end (dead reckoning, map-based localization, mapping, SLAM), add a standalone `SensorBase` test, and cover the `_animate` plotting branch and `range`/`angle` FOV filtering in `RangeBearingSensor`.
`EKF.py` (1617 lines, 39 methods) has zero live tests -- every EKF test in `test_mobile.py` (`DeadReckoning_test`, `MapLocalization_test`, `Mapping_test`, `SLAM_test`, `ParticleFilter_test`) is commented out and is unconverted MATLAB syntax (`randinit`, `tc.TestData.Duration`, `veh.add_driver`, `numcols`) -- never ported when this was ported from the MATLAB toolbox.
`sensors.py`'s `SensorBase` has no standalone test either, only indirect exercise via `RangeBearingSensor`'s 3 tests (`test_init`, `test_reading`, `test_h`). Untested: the `_animate`/plotting branch, `range`/`angle` field-of-view filtering, and the `fail`-window simulated-failure option.
This gap is exactly why two kwarg renames on these code paths went unnoticed for years: `Bicycle`'s `vlim`/`slim` -> `speed_max`/`steer_max` (2021, fixed in #596) and `SensorBase`'s `animate` -> `plot` (2023) -- both broke the RVC3 book's own example notebooks with no test catching either.
Proper fix: port the five commented-out MATLAB test stubs to real pytest tests exercising `EKF.run()` end-to-end (dead reckoning, map-based localization, mapping, SLAM), add a standalone `SensorBase` test, and cover the `_animate` plotting branch and `range`/`angle` FOV filtering in `RangeBearingSensor`.