I had this idea of using the PID Controller as the algorithm of the line following mechanism for my Robot. The problem (which is a nature behavior of the PID controller ) on the line gaps ( where there are no line e.g. 10 cm) the robot doesn't go straight forward but turns right . I thought about it a lot , and i couldn't find any better idea for modifying this algorithm to work in this situation but, adding two more sensors and specify the (white area on the 3 sensors ) as a special situation where the robot should go straight forward .
Now my question is is there any better idea , that i can use ?