Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move radar delay to carParams #1224

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions opendbc/car/honda/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime

ret.steerActuatorDelay = 0.1
ret.steerLimitTimer = 0.8
ret.radarDelay = 0.1

return ret

Expand Down
2 changes: 0 additions & 2 deletions opendbc/car/honda/radar_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ def __init__(self, CP):
self.radar_off_can = CP.radarUnavailable
self.radar_ts = CP.radarTimeStep

self.delay = int(round(0.1 / CP.radarTimeStep)) # 0.1s delay of radar

# Nidec
if self.radar_off_can:
self.rcp = None
Expand Down
1 change: 0 additions & 1 deletion opendbc/car/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ def __init__(self, CP: structs.CarParams):
self.CP = CP
self.rcp = None
self.pts: dict[int, structs.RadarData.RadarPoint] = {}
self.delay = 0
self.radar_ts = CP.radarTimeStep
self.frame = 0

Expand Down
1 change: 1 addition & 0 deletions opendbc/car/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ class LateralTorqueTuning:
carFw: list['CarParams.CarFw'] = auto_field()

radarTimeStep: float = 0.05 # time delta between radar updates, 20Hz is very standard
radarDelay: float = auto_field()
fingerprintSource: 'CarParams.FingerprintSource' = field(default_factory=lambda: CarParams.FingerprintSource.can)
# Where Panda/C2 is integrated into the car's CAN network
networkLocation: 'CarParams.NetworkLocation' = field(default_factory=lambda: CarParams.NetworkLocation.fwdCamera)
Expand Down
Loading