{ [ ] Projects >>> [Hardware] - [Software] - [Class] - [Other] - [Failed] -|!|!|- [Resources] - [Biography] - [Contact] - [ ] }

Swiftsure BS2e Robot

Note
Since the documentation was first written, I have significantly improved my electronics and programming skills. This is an example of a viable first project in electronics for a high school student with some experience in programming.



This is my senior project (12th grade) of a robot named Swiftsure. I had been considering going into architecture for my major, until I attended the DARPA Urban Challenge in Victorville, CA. This collection of robotic vehicles inspired me, and I decided to do something autonomous for my senior project at Escondido Charter High School. I had seen the BS2 starter kit at Frys, so I shelled out the $150 bucks and got it. I was surprised at how easy it is to program, especially with a background in Java. I then designed my first robot, Swiftsure.
 
My design goal was to have an autonomous robot that could travel from point A to point B, and then camp out at that point and flash a light like a lightship (just google Swiftsure 1904). Unfortunately, I grossly overestimated the capabilities of the Parallax GPS in calculating the current heading, and so I cut down my project to just an autonomous roving vehicle. The official purpose is "To autonomously rove about until an external trigger, in this case a low light level, cause the bot to stop and collect environmental data until the external trigger dictates to move on again." It wasn't until about two weeks before my presentation that I discovered the compass module, and by then I was reluctant to rebuild a working robot with so little time.
 
Swiftsure specs:
 
Brains: BS2e
Sensors:
 1 - Ping
1 - Sensiron Temperature/Humidity
1 - GPS
2 - Custom Bumpers
 
Other Electronics:
1 - Datalogger
1 - Ping Spin servo
1 - Tank Tread Kit
 
 
My object avoidance algorithm is as follows:
  • Desired heading is known.
  • Look in direction of desired heading.
  • If clear, go that way.
  • If not, look to the right a little bit.
  • If clear, go that way.
  • Repeat as needed to the left, and then to the right a bit more, then to the left, and so on.
  • If no clear path is available, reverse direction.

The code is attached at the bottom of this page. The files are linked, so open up "Main.bse" to open the project.

 

Some notes are in order:
 
The program control passes from one slot to the next quite often. I treat some slots, like the datalogger slots, the gps slot, and the sensiron slot as big methods that I call and then return from. To facilitate this I use spaces in the SCRAM to create my own method call system. The word file is used to help me remember where everything is.
 
For this version, I didn't have a compass so navigation was reduced to a random type pattern. For Swiftsure II I will be adding the compass and hence navigation (I also added a second BS2 to handle the info gathering), so I was able to improve and clean up the code later. I'll post it when I finish.
 
The code uses some of the standard methods from example files for the GPS, Datalogger, and Sensiron. I couldn't come up with any real improvement on that front.
 
The roving program is the heart of the project as the best organized and most creative. There are several main components. Navigation is done in a look first, then decide method. The bumpers program is there to tell if the bot is stuck by either having both bumpers pushed at the same time, or by bouncing back and forth between two objects.



Attachments
(Right Click and "Save Link As...")

Scram Listings.doc
Swiftsure Code.zip


(c)2010 Cody Lewis
lewisc@cs.ucr.edu