Latest Entries »

New Website

This will be our last blog post on this site. We have set up our new blog and website at and encourage everyone following this blog to follow the new blog instead. Thank you everyone who has visited this blog and I hope to see you all at our new blog.

This site will remain up in the short term so links aren’t broken until we are confident that nobody is visiting this site anymore,


UBC Snowbots


Hardware road map

After my experience last year working on blizzards hardware design I’ve learned a lot. One of the most valuable lessons is that even if you build a robot with a lot of cool sensors on it they may not be used. This is simply because there is a difference between having the raw sensor data accessible and having usable processed data.

As a result, this year I will be writing code that goes along with all of the sensors and integrates their outputs into a simplified format for every one working on the navigation software to use. The sensors will mainly be used to allow for imputs of just the velocity and desired direction to be used by the navigation team.  rather then having to worry about how much a hill will slow them down or what their servo outputs will do they can focus on getting the robot to run. To do all this I plan to have quite a few more sensors than last year.

This is the list of sensors that every robot will have. They will also have LIDAR, cameras and inferred distance sensors, (but that’s more up to the sub-teams to decide).

3 axis gyroscope
3 axis accelerometer
3 axis magnetometer

Encoder wheel
DC generator tachometer

battery voltage sensors
battery current sensors

and possibly a Gps

My plan with these sensors is to find the orientation, velocity and distance our robots travel. Most of our robots will be using an Arduino (avr 328) microcontroller. I am using a Directional cosine matrix algorithm to find the robot’s orientation.

In brief this is how it will work. the gyroscope is the most important sensor in this setup. It measures the robot’s rotation, but it has a slight drift.  Thus, over time there will be an error of a few degrees per second. To compensate I measure the force of gravity and the magnetic field.

Unfortunately accelerometers don’t directly return the force of gravity.  The accelerometers’ output is complicated by the centripetal force and the forward acceleration. To calculate these forces I need a way to measure instantaneous velocity of the robot.  While encoders are good for measuring displacement, they aren’t the best to measure velocity. Yes, they work, but they have problems. for example they have problems finding zero velocity and calculated accurate acceleration. Therefor, I plan to measure the voltage produced by asmall motor produces that is mechanically linked to the drive train.  With the velocity I can use the z gyro value to counter the centripetal acceleration and I can derive the forward acceleration as well.

So far this does a good job countering the roll and pitch, but what about yaw?  The compass(magnetometer) is good for yaw, but needs to be corrected for pitch and roll.

With the data processed in this way I will be able to apply PID control to take simple commands from the navigation software. If this is implemented properly it could have it run down a straight road on its own with only initial commands.

Installing ROS on Gumstix Overo running Ubuntu 10.04

ROS logoSnowbots users ROS as the software platform for our robots. Since deciding to experiment with Gumstix to build smaller, nicer looking vehicles we have been looking for a way to run ROS on it so we do not have to modify any of our other code to make our robot work.

After figuring out how to install Ubuntu 10.04 on the Gumstix Overo, installing ROS became trivial. Ubuntu has all the required dependencies for ROS so all that was required was to compile ROS. Following the ROS Installing On Ubuntu from SVN instructions located here worked perfectly. This solution does work perfectly but it does require compiling the code natively which can be quite slow. It took nearly 2 hours to compile ROS itself. I was also able to get add-ons like OpenCV to work correctly as well, but compiling code for it was extremely slow. I have yet to performance testing

Now that ROS is installed, the only thing remaining to drive our robots with a Gumstix is to interface our hardware with the Gumstix.

Videos to come when we get everything working

Ubuntu 10.04 on Gumstix Overo

Checkout our new Website/Blog here.

I have installed Ubuntu 10.04 on a gumstix overo using a collection of instructions found online. A summary of the instructions is below for convenience. This is my first attempt and there are a few issues that I am going to try to resolve.

I used an ubuntu 10.04 desktop machine as my working environment for these instructions.

1. Install rootstock: ‘sudo apt-get install rootstock’

Rootstock is a utility used to make a rootFS for a port

2. make rootfs using rootstock. This may take several hours

I used the following command but doing ‘man rootstock’ will give you a list of advanced commands

I set my distribution with -d to lucid because I wanted ubuntu 10.04

the openssh-server will allow you to connect your gumstix to the internet and ssh in

‘sudo rootstock -f “Gumstix” -l “gumstix” -p “overo” -n “Gumstix Overo

Ubuntu” -s lxde,gdm,openssh-server,x11vnc -t “America/Vancouver” –serial ttyS2 -d lucid –locale en_US.UTF-8’

Note 1: the user gumstix and password overo do not work because the user does not get created properly. More on how to deal with that later

Note 2: my rootstock command threw a segfault near the end but still made the image. Everything appears to be working fine so far but I am going to try to figure out how to stop it from doing that

Note 3: the lxde,gdm is good for a minimal install for use on a small device with limited power and storage space. Good for a headless system.

Link for more info on making a rootfs

3. Get MLO and u-boot from this link

4. Get your kernel u-image This kernel is based on the 2.6.34 kernel. Newer and older kernels should work but you will have to find modules for that kernel. (see step 8 )

6. put MLO, u-boot, u-image on microSD card boot partition

7. extract generated rootfs to second partition

8. Download and extract modules and copy them to second partition (where you extracted the rootfs)

9. On the second partition open the /etc/shadow file. ‘sudo gedit /path/to/second/partition/etc/shadow’

Delete the ‘*’ for the root entry. This will allow you to login as root and create a user.

Note: remember to put the ‘*’ back after you have created a user so someone can’t login as root and screw up your system

10. open the ‘/etc/network/interfaces’ file. ‘sudo gedit /path/to/second/partition/etc/network/interfaces’

add the following code to the bottom

auto eth0

iface eth0 inet dhcp

You can now unmount the microSD card, place it in the gumstix and boot to it.

Login using serial console using the gumstix instructions in the link below or you can plug an ethernet card in and ssh in

11. login as root and then create a user for yourself and give yourself sudo

sudo adduser youruser

sudo adduser youruser sudo

sudo apt-get install nano

nano /etc/shadow

add the ‘*’ back in that we removed earlier

log out as root

12. log in as your user

open the /etc/apt/sources.list file

add the following lines if they are not present

deb lucid-updates main

deb lucid-security main

then close the file

sudo apt-get update && sudo apt-get upgrade

13. Have fun

email me at if you have any problems or have something you want to add that other people should know

Imagine Day Recruitment

Snowbots is a UBC student team that makes autonomous racing robots. We compete in the robot racing completion held every year during the summer. We won the 2010 Robot Racing competition in Windsor Ontario and are hoping to defend our title at this year’s competition which we hope will be at UBC.

We took two robots this year to Windsor, Blizzard and Oscar Jr and our recruitment goal for this year is to recruit enough people for 4-5 vehicles with 2-3 people per vehicle. With the amazing turnout on Imagine Day I am sure we will meet our goals and it will be an exciting year for snowbots.

We have our weekly meeting from 10 AM – 2 PM every Saturday and pizza arrives at around 12:30. Depending on the number of people, pizza normally costs each of us only a couple of dollars because of our sponsorship with Domino’s Pizza. We are currently meeting in Kaiser main atrium.

Kaiser is normally locked on weekends but CEME (Civil and Mechanical Engineering) is unlocked or you can bang on the door or call/email us to be let in. Feel free to contact us if you have any questions.

Thank you again for coming out on imagine day and I hope to see you all on Saturday morning.


Youtube videos:


Plans for a new year

This year Snowbots is starting of with renewed confidence from our outstanding win.  We plan this year to dramatically increase the number of robots we are fielding this year from 2 to six.  we also plan to start testing new technologies on our robot in the hopes of doing even better.  depending on where are interests lead us we will be fielding robots using cameras, stereo vision, lidar, and/or IR sensor arrays for navigation.  we plan to have sub-teams of 2-3 individuals working on each robot and we look forward to recruting mew members to fill in the ranks.

Snowbots Recruitment

As the school year is starting Snowbots is looking for new members to join.  We welcome anyone who commits to the club.  We know that some prospective members may feel that at the beginning of university they won’t have any useful skills. I can tell you that this is wrong. I joined Snowbots in the first year of university. At first it was true that I didn’t know much, but being in Snowbots taught me what I needed to know to be useful.  I ended up putting everything outside of the computer together for our winning robot from the modifications on the rc car to house our sensors to the microcontroller code.  Now I’m the Head of the mechanical design in Snowbots and can tell you that all you need is a strong interest in robotics to be a useful member of the team.

So if you would like to join Snowbots I ask you to fill out the form below.  Our meetings are on Saturdays from 10-2 and we will be taking part in an open house showcasing some of UBC’s amazing student teams where you can learn more about us.

signup sheet


The Race Is Done

Friday Practicing

Today we are practicing at the competition site, but we are alone. it seams that we are all alone with most of the other teams having major mechanical failures.

heres a video of us racing against the windsor team (they are not in autonomous mode).

more photos on flickr


Thursday in Windsor

What a day we have been doing a lot of coding and bug testing today so I don’t have much time to blog, but I can post all the pictures and videos I took today. If you want to see more click through to the flickr gallery.

some video of the robots in action.

Mark and Ian doing some last minute bug fixes.

We managed to make it to where the competition will be to do some testing on site.

Unfortunately we where rained out at the track and had to retreat to the hotel.

Hopefully the next post will be more substantial.