selfdrive.locationd.test package
Submodules
selfdrive.locationd.test.test_calibrationd module
selfdrive.locationd.test.test_locationd module
selfdrive.locationd.test.test_locationd_scenarios module
- class selfdrive.locationd.test.test_locationd_scenarios.Scenario(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum
- ACCEL_OFF = 'accel_off'
- ACCEL_SPIKE_MIDWAY = 'accel_spike_midway'
- BASE = 'base'
- GPS_OFF = 'gps_off'
- GPS_OFF_MIDWAY = 'gps_off_midway'
- GPS_ON_MIDWAY = 'gps_on_midway'
- GPS_TUNNEL = 'gps_tunnel'
- GYRO_OFF = 'gyro_off'
- GYRO_SPIKE_MIDWAY = 'gyro_spike_midway'
- class selfdrive.locationd.test.test_locationd_scenarios.TestLocationdScenarios(methodName='runTest')[source]
Bases:
TestCase
- Test locationd with different scenarios. In all these scenarios, we expect the following:
locationd kalman filter should never go unstable (we care mostly about yaw_rate, roll, gpsOK, inputsOK, sensorsOK)
faulty values should be ignored, with appropriate flags set
- pytestmark = [Mark(name='shared_download_cache', args=(), kwargs={}), Mark(name='xdist_group', args=('test_locationd_scenarios',), kwargs={})]
- classmethod setUpClass()[source]
Hook method for setting up class fixture before running tests in the class.
- test_accel_off()[source]
Test: no accelerometer message for the entire segment Expected Result:
yaw_rate: 0
roll: 0
sensorsOK: False
- test_accel_spikes()[source]
ToDo: Test: an accelerometer spike in the middle of the segment Expected Result: Right now, the kalman filter is not robust to small spikes like it is to gyroscope spikes.
- test_gps_off()[source]
Test: no GPS message for the entire segment Expected Result:
yaw_rate: unchanged
roll:
gpsOK: False
- test_gps_off_midway()[source]
Test: no GPS message for the second half of the segment Expected Result:
yaw_rate: unchanged
roll:
gpsOK: True for the first half, False for the second half
- test_gps_on_midway()[source]
Test: no GPS message for the first half of the segment Expected Result:
yaw_rate: unchanged
roll:
gpsOK: False for the first half, True for the second half
- test_gps_tunnel()[source]
Test: no GPS message for the middle section of the segment Expected Result:
yaw_rate: unchanged
roll:
gpsOK: False for the middle section, True for the rest