PDXBot07 Robo Magellan event report

It was a rainy day.  Only two competitors showed up.  My robot (now named "FLASH") and the other guy.  It was an exciting event, and I wish I had more time to get to know the other guy and his robot but I found that the event was more intense than I had expected.  I had my head in my laptop trying to get the route programmed into the thing.  I built my route and then futzed around programming it in.

I wasn't thinking competitively, and was trying the full rout looking for all 3 of the cones.  Today I realize that I should have just gone for the last cone, taking the safest rout for my robot.  Thats not what I did.  However; I did learn a lot of things and had a good time.  Flash came in second.  (and last)  The rest of this page attempts to document the event and what happened from my perspective.  I WILL be back next year, and I'm going to improve my design and enter the Seattle event this fall.

First off, it was RAINING!  I showed up at 10am and set up my shelter, table, laptop, power supply and got ready to update my python program defining my route, and make a run for the cones.  The following is the input data I could have used but didn't have the sophisticated geodetic computations figured out in time.  :

way point
N45deg 30.622min W 122deg 41.141min

cone 1
N45deg 30.649min W 122deg 41.140min 0.8
cone 2
N45deg 30.678min W 122deg 41.134min 0.5
N45deg 30.688min W 122deg 41.126min

The first impression I had of the route was "oo, thats a really long".  The longest rout I've done so far was 16m.  I ended up taking a compass and a odometer and walking off a 9 way point route of (heading, distance) pairs.

My field notes where:
H1= 302,     D1 = 33.4m
H2 = 0,        D2 = 5.3m
H3 = 308,    D3 = 32.7m
H4 = 350,    D4 = 17.5m
H5 = 13,      D5 = 9.8m
H6 = 70,      D6 = 4.1m
H7 = 240     D7= 3.4m
H8 = 342     D8 = 15.2m
H9 = 20       D9 = 3.1m

Next I converted these magnetic headings into a differential heading off of what I was hoping would by my initial heading.

Looking back on this I should have seen a huge issue right off the bat.  (I don't have a good excuse, and if you knew my employment history you'd be right to give me a big ass dope slap.  Sorry Mike...).  Given the way my robot currently works to track distance and heading.  (no off track error computations yet) this is equivalent to a 9 bank pool shot.  Its just not going to work out well.  Also given the known errors and system noise, my strategy was flawed. 

Next I used pencil and paper to convert these into delta and distance (in cm) for programming into the robot.  From my notes I have:
d1 = 0     D1 = 3340
d2 = 58   D2 = 530
d3= 6       D3 = 3270
d4 = 48   D4 = 1750
d5 = 65   D5 = 980
d6 = 128   D6 = 410
d7 = -62    D7 = 340
d8 = 40    D8 = 152  <-- yipes this is 10x too short!  should be 1520
d9 = 78      D9 = 310

I did check my work 2 times and I recall catching one fat-finger error on d5, as I programmed in the data.
Next I programmed the following into my robot's python program for the route:

    status = get_status()
    test_heading = status[1]
    ROUTE_INDEX = 1000
    delta = 1
    track_heading(40, test_heading + delta, cm(2000))
    track_heading(40, test_heading + delta, cm(1340))

    ROUTE_INDEX = 2000
    delta = 58
    track_heading(40, test_heading + delta, cm(530))


    ROUTE_INDEX = 3000
    delta = 6
    track_heading(40, test_heading + delta, cm(2000))
    track_heading(40, test_heading + delta, cm(1270))

    ROUTE_INDEX = 4000
    delta = 48
    track_heading(40, test_heading + delta, cm(1750))

    ROUTE_INDEX = 5000
    delta = 65
    track_heading(40, test_heading + delta, cm(980))

    ROUTE_INDEX = 6000
    delta = 128
    track_heading(40, test_heading + delta, cm(410))


    ROUTE_INDEX = 7000
    delta = -62
    track_heading(40, test_heading + delta, cm(340))

    ROUTE_INDEX = 8000
    delta = 40
    track_heading(40, test_heading + delta, cm(152))

    ROUTE_INDEX = 9000
    delta = 78
    track_heading(40, test_heading + delta, cm(310))


As you can see from the code, my design goes heading distance based off of a delta angle from the starting heading. so just a bit of error in starting heading would have a significant error by the time I got to the end of the route.  Additionally, the compass from reading to reading is known to return +/- 2 degrees.

What actually happened was that it never got past ROUTE_INDEX = 1000.  Every time it drifted over and, ever so slightly clipped the high curb that was bounding the side walk I was trying to shoot the robot down.  Hitting the curb triggered the bump sensor, which at this time is an un-recoverable condition.   Another reason to only go to the last cone.  Again what was I thinking?  Trying to do all the cones, that was nu-reasonable.  To be a bit fair, I didn't realize it was an nu-recoverable condition unit the first crash into the curb.  Then I had a bad feeling, but damn it, I wanted to see if I could shoot my robot down that long 33.4m sidewalk and I was going to try at least one more time.

I tried a second time this time hit the wall a few meters down from the last hit.
I tried a third time I came within 2 meters of clearing the wall :(  ending my attempts.

Later I ran a fourth time as a debug attempt.  Here I manually moved the robot away from the wall's and obstacles to see what it would do if I allowed it to just keep going.  Here I found the robot ended up 109feet away from the final cone.  the 15M error seen above isn't big enough to explain that.  I also saw some turns that didn't "seem" to be what was expected.  I didn't have the tools (and it was raining) with me to mark off the actual heading changes, but I'll go back next weekend to gather that data.  There may well be a bug in my heading error logic, or odometer y bug or hardware problem with my motor encoder.....  I want to understand what happened and why so I can move forward.

I'll be putting up a new page to log the "up-grades" and my new TODO list for the Seattle event shortly.

All in all it was a very fun and learning experience.  The following are pictures form the big day:

pit area
My "pit area"  (boy I'm sure glad I brought that pop-up)

making some cource correction attempts
Attempting to correct for the drift into the curb.  Using a cross over cable to SSH into the NSLUG computer that was executing the python route program.

starting my second run
Starting my second attempt.

after hitting the wall I attempted to continue to see what it would do.
Continuing on after hitting the wall the second time to see what it would do.

this is where it thought the last cone should have been.  (the actual cone was barring 22deg and 109.5 feet away)

bact to the pit area.
Heading back to the pit area.

second place
Flash with its second place award.

It was a wonderful experience and there are a lot of improvements I can make in software and minor enhancements to the platform.  I'll be working on improving this bad boy for the next few events!  I highly recommend entering this event.
I'll be back.