Planning for a self navigating robot

As I mentioned in the previous post, I plan on building an autonomous navigation robot that is powered by an android device coupled with the IOIO board. The basic idea is to create an application that I can selected a point on the map and hit “Go”. This build will be the most advanced robot build I have ever attempted, and I’m quite excited about it. My only other previous robot experience is with my old VEX robotics kit, building autonomous robots that are only capable of blindly feeling their away around, with no end goal, other than navigating a maze. Before I was held back by the capabilities of the VEX controller’s pic and a lack of sensors (due to my budget); now I have the processing power of an android device and access to all the sensors that it contains.

For this project I will be accessing the android devices internal GPS and compass. Using the information provided by them I plan on using the information to drive a r/c truck or robot base to a specific latitude, longitude autonomously. Keeping this information in mind I planned out the navigation activity.


The Navigation Activity:

  • Must have a map view to display the robot’s current location and direction.
  • Must have gps accuracy information displayed
  • Must allow the user to select a point on the map (draw a point with a circle around it)
  • Must have a “Go” button
  • Must display onscreen log information to assist in debugging


Once the UI was done, then I started planning out the algorithms needed to drive and steer the robot to it’s destination. The first thing that needs to be done is to process the robot’s location & heading and the destination’s location and bearing. With this information we can learn the answers to the following questions:

  1. Is the robot at it’s target location?
  2. What is the distance from the robot to it’s destination?
  3. Is the robot facing the target location?
  4. If not, what is the bearing to the destination?
Knowing this information we can plan out a few simple methods in pseudo code.


public void updateDrive(){
    if the is robot with in 10 meters of it’s destination {
        stop robot and cancel the autonomous routine
    } else {
        drive the robot forward


public void updateSteering(){
     if the robot is heading towards the the destination {
        steer stright
    } else {
        if the robot is heading left of the destination {
            steer the robot right;
        if the robot is heading right of the destination {
            steer the robot left;

Using the pseudo code above, I will be creating very simple navigation algorithms to drive and steer the robot to it’s selected location.

Leave a Reply