A fragment of the radar firmware build, recovered from a build agent. It shows how the health policy reaches the firmware.
# radar_selftest.py (from the NordRadar firmware build)
#
# The build installs the radar health-policy package by name from the
# configured package indexes and reads POLICY from it.
#
# pip install \
# --index-url https://pkgs.public.pypi/ \
# --extra-index-url https://pkgs.nordradar.internal/ \
# bsw_radar_health
#
from bsw_radar_health import POLICY # e.g. {'aeb': True, 'range_gate_m': 180}
def arm_aeb(vehicle):
# automatic emergency braking is armed only while the radar
# health policy says the radar is good
if POLICY.get('aeb', True):
vehicle.arm('aeb')
else:
vehicle.disable('aeb') # radar reported unhealthy
return POLICY
The firmware build resolves packages from these indexes, in order:
| order | index | url |
|---|---|---|
| 1 | public | https://pkgs.public.pypi/ |
| 2 | private | https://pkgs.nordradar.internal/ |