Cartographer Robot

At the University of New Hampshire, the Electrical Engineering seniors are tasked with designing and implementing a “Senior Design Project”. Being the robotics enthusiast that I am, I chose to implement a robotic room mapping system. The system I designed consists of both the robot hardware and a software interface for the computer. This page details both the prototype and the final product.

The Robot Hardware

The chassis of both the prototype and the final revision were designed using Google SketchUp and manufactured by Ponoko.

Laser-cut prototype chassis parts from Ponoko

The motors with quadrature encoders, motor mounting hardware, wheels, caster, and motor driver were purchased from Pololu.

Assembly of the bottom layer of the prototype

I assembled the prototype circuitry on breadboards which were secured to the mid-layer via the adhesive backing. The robot is powered by 8 AA batteries which are secured to the bottom layer behind the motors. The microcontroller I chose for this project is the Parallax Propeller which is an 8-core 80MHz 32-bit chip which comes in a very convenient 40-pin DIP package. The robot communicates wirelessly with the computer interface using an XBee wireless link.

Prototype from the front showing breadboard and motor driver

The robot employs three distance sensors between the mid and top layers. Facing forward is a Maxbotix MB1010 ultrasonic rangefinder and on either side are Sharp GP2Y0A02YK0F infrared distance sensors. I am slightly embarrassed to admit one design flaw in the prototype: I forgot a power switch. This was going to be a long testing phase.

The fully assembled prototype robot

Once I was satisfied with my prototype, I designed a printed circuit board using DipTrace and had it manufactured through BatchPCB. Although I only ordered one, I got two. I’m not complaining though!

Printed circuit board from BatchPCB

The populated PCB

The final chassis design was the next step. I added some design elements to the original such as a stenciled name and protective covers for the front.

The final chassis parts from Ponoko

Assembling the bottom plate. Notice the high-tech wire restraints.

Layer 2 assembly showing the mounted PCB and connections to the bottom layer

Finally the robot is complete and works extremely well! Some tweaking of the infrared distance sensors on the side were necessary because the IR beam projects outward at an angle. By making sure they both were angled upward, the robot did not report the floor as being an obstacle. I would also like to point out the inclusion of a power switch this time!

The final assembled robot in all it’s glory

The Computer Software

In order to control the robot I wrote a computer interface in Processing. It allows the user to double click a location to set a waypoint. Upon clicking “submit”, the robot will attempt to travel to that location as long as there are no obstacles in the way, reporting map data as it moves. Alternatively the “Rotate and Scan” button causes the robot to spin in place and gather map data which sometimes works for small rooms.

The computer interface for my Cartographer robot

Other features of the interface are the “Motor RPM” slider which allows the user to choose the robot’s overall speed, the “Zoom” slider which sets the zoom level of the map, and a set of load/save interface elements which treats the maps as CSV files. The user can also click and drag to pan around the map.

  1. Super! Very cool robot.

    I have some additional questions if you don’t mind.

    Do you use a compass, gyroscope or gps module?

    Where do you store the data/measurements ? In the robot or the computer running your navigation program.

    Do you use slam or does the robot stops to measure its environment?

    • Thanks for your interest Kris!

      I don’t use a compass, gyro, or GPS for localization. The location of the robot at any given time is determined using the quadrature encoders on the motors and the differential drive dead reckoning equations.

      Any time the robot is moving it’s periodically collecting distance data from the front, left, and right sensors. A packet containing the robot’s X and Y position, angle, and all three sensor readings is sent to the computer via the wireless serial link. The computer then uses this information to calculate points on the map, which is updated in realtime.

      • Hi,

        One more question 🙂

        If I understand it correctly, you also use the encoders to set the correct angle of your robot in order to use the dead reckoning equations.(no compass)

        How are you able to do that?

      • It is not possible to set the angle relative to magnetic north without a compass obviously, but it can set it’s angle relative to it’s own starting angle.

        If you take a look at the dead reckoning equation for finding angle:
        Angle Dead Reckoning Equation
        you see that there are 5 variables:
        Rw: the radius of each wheel
        D: the distance between the wheels
        Tr: the amount of pulses the encoder produces for a full rotation of the wheel
        T1 and T2: the amount of pulses produced by each encoder so far

        When the robot is first turned on, it assumes that it’s angle is 0 degrees. To then set the robot’s angle to 30 degrees relative to that (for example), it pivots in place counterclockwise and repeatedly calculates the above equation until it’s within 10 degrees of the desired angle. It then completes it’s rotation at a much slower speed so that it doesn’t overshoot the angle.

  1. Pingback: Cartographer – Robotic Room Mapping System « Justin Woodman

  2. Pingback: Simple BeagleBoard-xM Based Robot « Justin Woodman

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: