Lego sumo bot program


The first sumobot winning two out of the three games is the winner of the match. What is robot sumo? Sumobot specifications A sumobot must be made entirely out of LEGO parts, with the only exceptions being the flag. The number of motors and sensors used are only limited by how many the brick support.

NXT bricks support 3 motors and EV3 bricks support 4 motors. Both type of bricks support 4 sensors. The robot must fit inside a 10" x 10" square box no height limit when it is in it's starting configuration. The robot must be designed to wait five seconds, after the contestant presses a start button, before it moves. All actions must be pre-programmed. The use of any form of remote control is prohibited. The robot must not include any part that fixes the robot to the playing field surface.

Competition A match consists of three games of up to three minutes each. Beginning of the Game Before the game, the contestants greet each other outside the playing field following the chief referee's instructions, and then enter the playing field.

The contestants can place their robot anywhere behind their starting line. No part of the robot can be in front of the starting line before the match begins. The contestants must exit the playing field during this 5 second period. Prior to the start of a match, the entire robot must fit inside a square box as defined for the weight class.

At any time after the start of the match, the robot can expand outside these dimensions. End of the Game The game ends when the referee calls the winner. Both contestants should thank each other for a fair and competitive match after removing their robots. A game will be stopped and a rematch will be started under the following conditions: The original SmartBot was gradually stripped of sensors and stuff and became DummyBot — our training dummy.

Not just once, but repeatedly. So we went through a bunch of cycles of integration testing and tweaking the hardware and software.

We kept failing over and over often in funny ways , but every iteration we got a bit closer to winning. One interesting thing happened along the way. We noticed on the youtube clips that many robots tried to lift and topple their enemies.

So Dave built a pretty elaborate construction for that, and I helped write the code to control the lifter. In theory it was awesome, in practice it was useless. We wanted to keep Robit simple and focused on one thing — putting up a proper fight! We figured that would help us get under the wheels and push or topple the opponent. Nothing unique, most robots have something like that in the front. However it was hard to get the right angle of attack.

So the software needed some work. A simple algorithm that turned out to generate a pretty advanced behaviour! We were four people in the team — Dave and Jenny, me, and Lars. As for my role, well, it was mostly coaching. I did end up writing most of the code, but that was in tight collaboration with the kids. The big learning for me is how incredibly important and powerful it is to iterate fast!

And to do end-to-end integration testing early and often. The usual agile stuff in other words. So when Robit entered the arena he was already an experienced battle-scarred combatant! Initially I was hesitant to give it away, since we might compete again.