Completing the Unibotics Robot Programming Challenge

Hi everyone,

I’ve implemented a visual control solution for the Follow Line challenge and was able to complete a full lap in 8.9 minutes. The overall performance is fairly stable, but I’m noticing that the car tends to drift slightly off the line during sharp turns.

My current approach is based on a PD controller with centroid tracking, along with adaptive smoothing for both the detected line position and steering output. I’m also using a region of interest to look ahead and adjusting speed based on the tracking error.

It performs well on straights and gentle curves, but sharp turns still need improvement.

I’d really like to get some suggestions on how to improve:

  • Stability during sharp turns
  • Better anticipation of curves
  • Any control or vision-related optimizations

I’ll use the feedback to refine my approach, and then I’ll create a final explanatory video after incorporating the improvements.

Link - Demo Video
(Video description contains the code for review.)

Nice solution @jitinsaxenaa, although simple :-).

Here you are some feedback:
1.- You are controlling the linear speed in three steps, maybe a smooth continuous control of V would improve the behavior. Perhaps another PID controller for V.
2.- You are using one the same control for the whole circuit. Maybe you can identify curves of straight areas based on image analysis and use different controllers. One for curves (the priority is not to separate greatly from the red line there) and another one for straight areas (and you can use faster V values there).

Cheers!