Hack Hitchin

Piradigm – Approach to Piwars challenges 2018

12th Nov 2017

Quick progress update: chassis wired and driving in remote control mode!


So now I’ve got the basic functionality working, I can start on programming for the challenges. In principle I could compete in three of the challenges right now, as they’re intended to be entered with manual control. As I mentioned last time though, I’m hoping to attempt them autonomously, as well as the mandatory autonomous challenges. Here’s how I’m intending to approach them all:
Somewhere Over the Rainbow (driving to coloured balls in sequence)
I’m hoping to use OpenCV’s contour detection for this challenge, to spot shapes which can then be filtered by size, shape and colour, to identify the coloured balls, then use the size of the ball and possibly the height of the arena to help judge distance to the ball. I have a few ideas to help make the image processing quicker and more reliable – have the camera at the same height as the balls and prioritise looking where the balls should be based on their expected height and angle relative to the start position.


Minimal maze
To help with many of the challenges, I’m intending to use external markers (like QR codes) to help track the robot’s position and orientation on the course. This year the minimal maze allows markers to be used, so I’m intending to put an ARuco marker on each corner, with the hope that a wide angle lens will always be able to see one marker, giving me position on the course at all times. I’ll preprogram waypoints for each corner of the track and use the markers to help navigate to them in sequence.

Hitchin Hackspace built a copy of the minimal maze last year. its the same this year, with different colours for each wall

Straight line speed challenge
Like the maze, I’m intending to put a marker at the far end of the course and just drive towards it. Once the marker reaches a certain size, I’ll know I’m at the end of the course and can stop. This is the first challenge I’m going to attempt to program. If I get all the others done and working reasonably reliably, I may come back and try to do it without a marker, just using the colour of the edges of the course as guidance.


Duck shoot (target shooting)
This challenge is intended to be shooting targets by manually steering the robot. I’m hoping to do autonomous aiming through object detection. I’ve picked a gun (blog post coming up on that) and got it to be electronically actuated, so I “just” need to find the targets and aim. I’m hoping the targets will be rectangles of a consistent colour, or at least something easily identifiable using opencv, but that’s up to the organisors and course builders to let me know. I know roughly the size, position and distance to the targets, so I may be able to use that to narrow down which detected shapes are targets.


Pi noon (1 v 1 balloon popping)
This is going to be tricky! I’m again intending to put markers at the corners of the arena so I can judge position. After that, I can either drive around randomly or look for coloured round things (balloons) and drive towards them. Hopefully after I’ve got the code for Over the Rainbow and Minimal Maze challenges working, this one should be more than halfway there. I think spotting balloons may be tricky though.
Slightly deranged golf
The golf challenge is a little like pi noon, in that there’s a round object on a course that’s going to be difficult to catch. I’m going to attempt it the same way, programming a waypoint for the hole and looking for round white objects that might be balls. Very tricky.

Golf Course from last year, note the steep hill at the start that caused the ball to roll into a hazard

Obstacle course
Again, by having markers on the corners of the course and programming waypoints, like the minimal maze, I’m hoping to autonomously navigate the course. The extra 3D-ness of the obstacle course will make this more difficult, as the markers may not always be visible. The main difficulty will be the turntable though. I may need to put a marker on the turntable or some other trick. I’m leaving this challenge until last, as its so difficult.


Obviously its still early days so these plans may change as I get into and find image processing is too challenging for some reason, but hopefully I can complete at least some of the challenges using the camera.

next week: design and build notes


Reminder: please vote for Hitchin Hackspace on the Aviva site here:  Hitchin Hackspace Community Workshop  We are very close to getting funding to enable our Hackspace, we just need a few more votes.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>