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

LanePlanner: correct path offset for TICI #23329

Closed
wants to merge 5 commits into from
Closed
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
8 changes: 3 additions & 5 deletions selfdrive/controls/lib/lane_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@


TRAJECTORY_SIZE = 33
# camera offset is meters from center car to camera
# model path is 0.06 m left of car center
MODEL_PATH_OFFSET = 0.06
if EON:
CAMERA_OFFSET = 0.06
PATH_OFFSET = 0.0
elif TICI:
CAMERA_OFFSET = -0.04
PATH_OFFSET = -0.04
else:
CAMERA_OFFSET = 0.0
PATH_OFFSET = 0.0


class LanePlanner:
Expand All @@ -41,7 +39,7 @@ def __init__(self, wide_camera=False):
self.r_lane_change_prob = 0.

self.camera_offset = -CAMERA_OFFSET if wide_camera else CAMERA_OFFSET
self.path_offset = -PATH_OFFSET if wide_camera else PATH_OFFSET
self.path_offset = self.camera_offset - MODEL_PATH_OFFSET

def parse_model(self, md):
if len(md.laneLines) == 4 and len(md.laneLines[0].t) == TRAJECTORY_SIZE:
Expand Down