Skip to content

Commit 507dcdb

Browse files
committed
no camera offset
1 parent 29ca763 commit 507dcdb

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

common/op_params.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(self):
9898
"""
9999

100100
self.fork_params = {
101-
'camera_offset': Param(-0.04 if TICI else 0.06, NUMBER, 'Your camera offset to use in lane_planner.py\n', live=True),
101+
# 'camera_offset': Param(0.04 if TICI else 0.0, NUMBER, 'Your camera offset to use in lane_planner.py\n', live=True),
102102
'torque_derivative': Param(5.0, NUMBER, 'Derivative used in the lateral torque controller', live=True),
103103
'global_df_mod': Param(1.0, NUMBER, 'The multiplier for the current distance used by dynamic follow. The range is limited from 0.85 to 2.5\n'
104104
'Smaller values will get you closer, larger will get you farther\n'

selfdrive/controls/lib/lane_planner.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
from common.realtime import DT_MDL
77
from selfdrive.hardware import TICI
88
from selfdrive.swaglog import cloudlog
9-
from common.op_params import opParams
9+
# from common.op_params import opParams
1010

1111

1212
TRAJECTORY_SIZE = 33
1313
# camera offset is meters from center car to camera
14-
# model path is in the frame of the camera. Empirically
14+
# model path is in the frame of the camera. Empirically
1515
# the model knows the difference between TICI and EON
1616
# so a path offset is not needed
1717
PATH_OFFSET = 0.00
@@ -30,8 +30,7 @@ def __init__(self, wide_camera=False):
3030
self.lane_width_estimate = FirstOrderFilter(3.7, 9.95, DT_MDL)
3131
self.lane_width_certainty = FirstOrderFilter(1.0, 0.95, DT_MDL)
3232
self.lane_width = 3.7
33-
self.op_params = opParams()
34-
# self.camera_offset = self.op_params.get('camera_offset')
33+
# self.op_params = opParams()
3534

3635
self.lll_prob = 0.
3736
self.rll_prob = 0.
@@ -44,13 +43,12 @@ def __init__(self, wide_camera=False):
4443
self.r_lane_change_prob = 0.
4544

4645
self.camera_offset = -CAMERA_OFFSET if wide_camera else CAMERA_OFFSET
47-
self.path_offset = 0 # self.camera_offset - MODEL_PATH_OFFSET
46+
self.path_offset = -PATH_OFFSET if wide_camera else PATH_OFFSET
4847

4948
def parse_model(self, md):
5049
lane_lines = md.laneLines
5150
if len(lane_lines) == 4 and len(lane_lines[0].t) == TRAJECTORY_SIZE:
52-
self.camera_offset = clip(self.op_params.get('camera_offset'), -0.5, 0.5) # update camera offset
53-
#self.path_offset = self.camera_offset - MODEL_PATH_OFFSET
51+
# self.camera_offset = clip(self.op_params.get('camera_offset'), -0.5, 0.5) # update camera offset
5452

5553
self.ll_t = (np.array(lane_lines[1].t) + np.array(lane_lines[2].t))/2
5654
# left and right ll x is the same

0 commit comments

Comments
 (0)