Skip to content

Commit

Permalink
average of last two tunes for dynamic camera offsetting
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Aug 23, 2020
1 parent 6744d48 commit 15ab5fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/op_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __init__(self):
'log_auto_df': Param(False, bool, 'Logs dynamic follow data for auto-df'),
'dynamic_camera_offset': Param(True, bool, 'Whether to automatically keep away from oncoming traffic.\n'
'Works from 35 to ~60 mph (requires radar)'),
'dynamic_camera_offset_time': Param(4., VT.number, 'How long to keep away from oncoming traffic in seconds after losing lead'),
'dynamic_camera_offset_time': Param(3.5, VT.number, 'How long to keep away from oncoming traffic in seconds after losing lead'),
'support_white_panda': Param(False, bool, 'Enable this to allow engagement with the deprecated white panda.\n'
'localizer might not work correctly'),
'prius_use_pid': Param(False, bool, 'This enables the PID lateral controller with new a experimental derivative tune\nFalse: stock INDI, True: TSS2-tuned PID'),
Expand Down
4 changes: 2 additions & 2 deletions selfdrive/controls/lib/lane_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _setup_static(self): # these variables are static
self._enabled = self.op_params.get('dynamic_camera_offset')
self._min_enable_speed = 35 * CV.MPH_TO_MS
self._min_lane_width_certainty = 0.4
hug = 0.075 # how much to hug
hug = 0.1 # how much to hug
self._center_ratio = 0.5
self._hug_left_ratio = self._center_ratio - hug
self._hug_right_ratio = self._center_ratio + hug
Expand All @@ -77,7 +77,7 @@ def _setup_static(self): # these variables are static
self._ramp_angles = [0, 12.5, 25]
self._ramp_angle_mods = [1, 0.85, 0.1] # multiply offset by this based on angle

self._ramp_down_times = [self._keep_offset_for, self._keep_offset_for + 1.5]
self._ramp_down_times = [self._keep_offset_for, self._keep_offset_for + 2.]
self._ramp_down_multipliers = [1, 0] # ramp down 1.5s after time has passed

self._poly_prob_speeds = [0, 25 * CV.MPH_TO_MS, 35 * CV.MPH_TO_MS, 60 * CV.MPH_TO_MS]
Expand Down

0 comments on commit 15ab5fb

Please sign in to comment.