Thunder Clap [Lego NXT]
Autonomous Lego Robot
Project Thunder Clap consisted of programming an autonomous Lego NXT robot using the Lejos API to complete three timed challenges.
The aim of the project was to implement project planning and project management skills we learned in our first year of the Computer Systems Technology program at BCIT.
Resource limits for the project was imposed by restricting access to the challenge tables and obstacle courses through limited open lab times, along with restricting the number and types of Lego pieces for constructing the NXT robot. In addition we had to learn a new technology on the fly (Lejos API / Lego NXT construction).
We were able to succesfully complete all three of the required challenges by carefully planning our strategy for each obstacle course.
For challenge one Thunder Clap had to navigate its way through a maze from a start line and cross a designated finish line. We programmed Thunder Clap to drive forward until it detects a wall, then stop and make a 90 degree right turn and move forward until it detects another wall with it’s Ultra Sonic sensor.
In challenge two, Thunder Clap had to find an unlocked white door out of seven white doors placed along the inside of a rectangulard shaped black wall. Once Thunder Clap is placed inside the rectangle, it detected the closest wall using Ultra Sonic sensors and travels to it and tries to travel past it so that it is squarely facing the wall to orient itself.
Thunder Clap then turns and travels along the black wall until it detects a change in the color of the wall using its photo light sensors. Upon detecting a color change, Thunder Clap faces the door and orients itself perpendicular to it drives through it, if it cannot drive through the wall, Thunder Clap continues traveling along the wall until it finds another white door and tries to travel through it.
In challenge three, Thunder Clap had to battle and win two out of three fights against another NXT robot on a circular arena platform. We used multi threading to implement a ‘seek and destroy’ algorithm to win this challenge.
Upon entering the arena platform, Thunder Clap begins to rotate in place 27 degrees at a time simultaneously checking to sense any objects within 35 cm with it’s Ultra Sonic sensors, if it detects an object it then proceeds to attack it by ramming into it and pushing it off the edge.
All the while, Thunder Clap uses the Photo Light sensor to detect changes in the color of the arena floor so it can avoid falling off the edge.
The final result was a thrilling victory for team Thunder Thighs!