A brand new challenge to Pi Wars and potentially the hardest they have ever had. Visual processing and distances in one challenge, Holy Cow Batman!

We had been playing with some visual processing for a few years as we always tackled the line follower courses using a camera rather than IR sensor bars. We hoped this might prove helpful but it was still a big step up as we went from processing a small section of an image in black and white to having to look at a whole image and recognise colours and shapes.

The first run was hampered by the fact that the colour balls were not the specified 10cm off the floor and were too high for the bot to see and as it got closer to them it couldn’t see them anymore. Without stopping the run we managed to leave the bot to it whilst we went round untangling the balls to make them the correct height and the bot then carried on as planned.

Going into the second run we were more optimistic, now that the balls were the correct height from the floor. However, the lid of the robot had slowly been sustaining damage during the day doing the other challenges and was sliding around a bit so it was taken off for the second run. Unfortunately this had the effect of reducing the weight of the robot which meant it was now going too fast for the bot to see the balls as it was spinning on the spot. As such we had to drop the lid back on whilst the challenge was still ongoing so that it could see the balls again.

After getting rid of the issues in the first two runs the third run went super smooth, this can be seen in the Part 5 video below. The third run was good enough for us to take 1st place in the Intermediate class!