need help with avoiding obstacle robot

Adafruit put a lot of effort into tutorials describing how to use their motor shields.
You might start by going through all the material on these pages, then you can learn at your own pace.