6
6
from common .realtime import DT_MDL
7
7
from selfdrive .hardware import TICI
8
8
from selfdrive .swaglog import cloudlog
9
- from common .op_params import opParams
9
+ # from common.op_params import opParams
10
10
11
11
12
12
TRAJECTORY_SIZE = 33
13
13
# 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
15
15
# the model knows the difference between TICI and EON
16
16
# so a path offset is not needed
17
17
PATH_OFFSET = 0.00
@@ -30,8 +30,7 @@ def __init__(self, wide_camera=False):
30
30
self .lane_width_estimate = FirstOrderFilter (3.7 , 9.95 , DT_MDL )
31
31
self .lane_width_certainty = FirstOrderFilter (1.0 , 0.95 , DT_MDL )
32
32
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()
35
34
36
35
self .lll_prob = 0.
37
36
self .rll_prob = 0.
@@ -44,13 +43,12 @@ def __init__(self, wide_camera=False):
44
43
self .r_lane_change_prob = 0.
45
44
46
45
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
48
47
49
48
def parse_model (self , md ):
50
49
lane_lines = md .laneLines
51
50
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
54
52
55
53
self .ll_t = (np .array (lane_lines [1 ].t ) + np .array (lane_lines [2 ].t ))/ 2
56
54
# left and right ll x is the same
0 commit comments