NordRadarportal
Leaked build artifact

radar_selftest.py

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

Build indexes

The firmware build resolves packages from these indexes, in order:

orderindexurl
1publichttps://pkgs.public.pypi/
2privatehttps://pkgs.nordradar.internal/