The end of the road

Well, despite all those good intentions, I end up blogging a post-mortem (or post-vitam if you like) instead of the journey made. So, let’s have a quick recap.

The Background

You might recall that the plan was always to run this as a Dads-and-lads introduction to robotics, using the PiWars competition as an end goal. And I’m glad to say that we stuck with that, meeting most Saturdays to work through the code and get the robot moving.

We started off with each team building their own CamJam EduKit robot and getting it working, and moved onto a combined robot for the competition itself, principally designed and built by Tony Vazquez, the driving force behind our entry. We had some very good sessions with code on a projector screen and people taking turns to add some functionality (or correct a previous error!), all of which got used in some way in the finished robot.

I’d been determined that it would be the learners writing code (albeit under fairly detailed instructions) and not just me clattering on the keyboard while they looked on. But that’s a slow way to work through 7 different challenges, and not everyone could make every session. In fact, we’d hardly approached even two challenges. So I stepped in late in the day to try to pull things together. But I also ran short of time (and suffered from that refactoring disease which fussy programmers suffer from).

Meanwhile my fellow club leader Chus was working very hard to build a Nerf-based shooter for the duck shoot, but just failed to make it robust enough in time for the competition, so we ended up leaving it behind. But here it is in partial action being controlled by Pi-based servos:

The final week

So with a week to go and some not-very-complete code in place, I was going to have some evening sprints to get us to a workable state. And then this happened:

That was Sunday 15th and our club’s only Pi3 (we’re using WiFi and Bluetooth) and our only driver boards. Tony Vazquez came round that evening with his own Pi3 and ordered two more boards from PiBorg. Luckily I’d been quite good at pushing things to Github, and managed an emergency commit & push before we lost the SD Card entirely.

On the day…

Although several people had collaborated over the months, we named a team of six and encouraged others to go along to spectate. We headed off nice and early to get there for registration around 9.30am

Everything went smoothly, the registration process was obviously well-organised and we were given a small room as our workroom, which we shared with a similar sized group from Kingston Grammar School (also with a group leader called Tim, coincidentally). This worked out nicely for both groups: we had similar robots in a similar state of under-preparedness, and we each found that we’d not thought to bring some equipment which the other team could lend us. So they used our screen and keyboard while we used some of their wood and ate some of their brownies. Thanks, KGS!

We beat Latymer Prep School in our first Pi Noon (sorry, Nic) with AV driving for us. And we then moved onto the Deranged Golf. Now, we’d come almost completely unprepared for this, but thanks to the assistance of the KGS guys, we put together a makeshift fork mechanism, let AC drive and managed a creditable performance:

Like many people, we skipped Over the Rainbow but we had a second round of Pi Noon to get through. In fact, our opponents had that awful of experience of failing to get a connection to their robot and, after an extended wait, we were given a bye through to Round 3. By this time, Chus had turned up with some of of the club Seniors to watch us in action.

We had a go at the Minimal Maze but, as expected, we were too challenged by the differences of surface and distance from our practice environment and the robot lost its orientation fairly quickly. I tried some live re-coding between runs, but not enough to save us.

Our next challenge was the Duck Shoot, which we hadn’t intended on trying without the Nerf gun. But, again, the KGS guys said that they thought it could be done just by re-using the golf appendage  as a shunt, so Tony V got to work improvising what turned out to be a very successful approach which, unfortunately, I don’t seem to have a picture of. Basically, he bolted a soft-drink can onto the front of the robot and we used that to push the balls against the targets. Amazingly, this got us 2nd place in that particular challenge! Well done to our driver AC for rapidly working out the best tactics for us.

We went straight from there to another Pi Noon round, this time against the awesome Autonomouse — a trireme of a robot, able to move in several directions at once. Somehow, against the odds, we burst all their balloons before they could burst ours and were through to the quarter-finals. (Although not without needing to remount the wire).

The Obstacle Course was always going to be quite straightforward in the technical sense — just a question of driving. And our friends from KGS with a similar build of robot had warned us that the only real difficulty was in the rubble-strewn area (“Stone / Paper / Scissors”) where some of the debris wedged under the chassis. Sure enough, this happened to us as well, but our driver AV was able to clear the obstruction and move on, as you can see from this photo:

With such a big robot, we came somewhat adrift trying to turn some of the corners, but AV just powered through — and sometimes climbed over the walls! Overall we did creditably on this one.

The semi-finals of Pi Noon with EC driving saw saw us through — to our complete amazement — to the finals. Let me say that, notwithstanding the skill of the drivers, there is a large element of luck in the Pi Noon setup. Which is good in  that a relative underdog (like us) can win unexpectedly against a robot with superior movement and speed. But when both bots are bashing each other with their pins, it’s really down to whose balloon is thinnest!

But first we had to do the Straight Line run and here’s where our team coding paid off.  The main problem was that, on the first run I realised I hadn’t disabled the testing mode we had to ensure we didn’t run off the end of our tables. The result was that the robot sped along about half the course and then stopped dead! I quickly disabled the test mode and restarted but of course that lost us time. We also over-compensated for the narrowed section and veered too far to the right. I quickly tweaked the compensation factor and the third run got straight through to the end.

And so to the Pi Noon finals, the last event of the day with everyone crowded round, where we were knocked out in a very quick, very close battle. Our thanks to our driver AV for doing his best in a difficult situation.

The Results

You can see us lined up here for the closing ceremony:

We obviously knew we were runners-up in the Pi Noon contest, and the lads went down to receive a medal from Dr Lucy Rodgers. You can see it here held by our final driver and his proud Dad:

And then, to my complete astonishment, we ended up in 4th place overall! I was genuinely surprised, and as the numbers counted down, I imagined that there must have been some kind of oversight and we’d been missed out in 23rd place or something. But there it was: Westpark Club and the lads were delighted (as were their Dads) as they collected the bag of prizes:

It was a great day for us, and I’m glad we decided to try everything we could, even where we had a fair chance of failing miserably. Thanks to all those who’ve helped over the past few months including those who couldn’t make it on the day — to Matthew with Daniel and Andrew, to Enrique with Alvaro and Enrique, to Chus and to Max, and especially to Tony with Alvaro. And thanks, of course, to the amazing Mike and Tim who’ve continued to run this for another year, putting an amazing amount of work and organisation into  making it a great community day out.

Thanks to all the other competitors and we hope to see you all next year