If line width is high enough (or camera is too close to ground like in our current case, hence line appears wide), then:-
- If the line goes to one side of camera too much, then it may consider it a signal to take sharp turn.
Possible solution
- Making a hard-coded solution where according to apparent width, the line_follower node switches to a higher row to check where width is lesser.
- Using openCV.
If line width is high enough (or camera is too close to ground like in our current case, hence line appears wide), then:-
Possible solution