Skip to content

Detect Lane has no attribute 'left_fit' #58

Open
@lucyivt

Description

Hi, I've been trying to get the lane detection code to work but keep getting this error:

AttributeError: 'DetectLane' object has no attribute 'left_fit'

The problem arises in line number 159 of detect_lane.py:
if yellow_fraction > 3000:
self.left_fitx, self.left_fit = self.fit_from_lines(self.left_fit , cv_yellow_lane)
self.mov_avg_left = np.append(self.mov_avg_left,np.array([self.left_fit]), axis=0)

Where we try to initiate self.left_fit while also using it in the function parameter. I've been struggling to figure out how to fix this problem, I've tried to initiate self.left_fit before this line (making it an array) but more errors occur. (I put the turtlebot between the yellow and white lines.) Any help would be greatly appreciated!

EDIT:
Posted this in the wrong git repo, I'm using noetic!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions