I know this is an oft-repeated question but I did not manage to find a satisfactory reply anywhere.
My robot is following the line perfectly with the line following code in it.
My robot is also avoiding the obstacle perfectly with the avoidance code.
When I combine the two, even basic line following does not work!!
Algorithm is like this: