For any mobile device, the ability to navigate in its environment is important. Avoiding dangerous situations such as collisions and unsafe conditions comes first, but if the robot has a purpose that relates to specific places in the robot environment, it must find those places. Getting our robot from one place to another is not a simple task. Here are some resources to help you on your way.
Path Planning is the process of breaking down a desired movement task into discrete motions that satisfy movement constraints and possibly optimize some aspect of the movement.
In robotics, obstacle avoidance is the task of satisfying some control objective subject to non-intersection or non-collision position constraints.
RoboRealm has a good tutorial on obstacle avoidance.