Need static path planner code

the thing is i have to help my friend

Your digging your whole deeper.

You may WANT to help your friend, and that would be understandable.

Path planning involves discovering all the possible paths between n points, and then choosing the best path between m points that are to be visited.

Apparently, you have a cane (an ultrasonic sensor), a Braille compass (the MPU6050), a Braille ruler (the encoders), so you can wander around blind bumping into things, and map out where the obstructions are, relative to some point.

Using this polar coordinate map, you can then find an unobstructed path to the target. It may not be the optimal path, initially, but the path will get better as the map get more accurate.

You've read about two of the most common ways of accomplishing the process.

So, what is the problem?