Monday, December 27, 2010

Robotics: Part 4



On this installment of blog posts about robotics, we’ll take a look at smaller and simpler robots built for the regular category of the National Robotics Competition (NRC). These robots usually involve just one controller (NXT these days), and usual maximum of 3 motors, with 2 sensors. They are built to achieve objectives and complete missions, rather than being a full functional robot used to demonstrate certain real world functions.

I have joined 2 regular category competitions, once during 2006, another during 2008. NRC 2006 was my first ever competition and I did not win, although one of our senior teams did, and made it to the national levels. I do not have any pictures of our robot, but basically it has to travel along the black line on the competition mat along an obstacle course that looks like this:

As you can see, the course has a slope and Lego ‘bars’ along the course, so the design of the robot has to take those into account. Many concepts were tried out (4-wheel drive, caterpillar track, flat 2-wheel drive, etc), but the Form 5 team (which won that year) came out with a ‘raised vehicle’ concept which allowed the robot to pass through the slope and bars easily and quickly. This concept was quickly added to our list of practical designs, and would be used again 4 years later.


National Robotics Competition 2010 Primary School Regular Category: Adventure Race


Earlier this year, I was contacted by a teacher from SJK (C) Sin Hwa (my ex-primary school) to coach and guide their robotics teams. To my surprise, the track was an obstacle course similar to the one used in NRC 2006, although there are many modifications, with extra objectives:

The robot needs to carry a ping pong ball, and pass through all the hurdles, slope and obstacles. The robot must always be over the black line, else it’ll be considered a mis-track, i.e. game over. The robots initially built by the students were flimsy and did not manage to achieve many, if any of the objectives on the track. I promptly disassembled one of the robots and started rebuilding, ending up with a robot that utilized the ‘raised vehicle’ concept, but with numerous improvements and modifications.

The ‘raised vehicle’ concept allowed the robot to maintain enough traction along the slippery slope, and prevented (to a large degree) the robot from going off course while going through the hurdles. An extra motor operated a ‘scoop’ which captured and carried the ping pong ball securely along the course.

The biggest improvement over the original ‘raised vehicle’ robot was actually the program loaded into the robot. In 2006, the robot had 2 light sensors that detected the ground colour, in order to steer the robot on top of the track at all times. The program was a simple ‘multi-fork’ program, which was basically commanding the robot along the lines of:

If sensor A and B are light, go straight

If sensor A is light, B is dark, turn left

If sensor A is dark, B is light, turn right

If sensor A and B are dark, go straight (to pass through hurdles)

Such a fork is easy to program (using diagrammatic programming interface such as Robolab), but requires the robot to be very slow, and is very much prone to failure, as it is heavily reliant on the light sensor readings. Faster speeds will easily cause mis-tracking. Thus, I used a mix of ‘forks’, ‘switches’ and regulating command blocks that prevented the robot from going off the track.

I don’t have the program diagram, but here is a video of the robot going through halfway through the track during a practice session:

During the competition:

As it turned out, none of the primary school teams (those I coached inclusive) managed to complete the track during the competition. Despite that, one of the teams I coached managed to get a robot halfway through the track, good enough for 2nd prize.

That achievement is quite weird, considering the fact that regular category is usually the toughest to win nearly every year. Points between competing teams are usually very close and every team needs to fight tooth and nail to win. That was the case during NRC 2008, the final robotics competition I participated in.



National Robotics Competition 2008 Upper Secondary Regular Category: Robot Planting

Team Members: Lim Jia Wei, Jason Lee Kee Hean, Lee Joeshua

The objectives of this competition are very much different compared to the previous ones described. The playing field looks like this:

Beside the start box are a few small Lego ‘plants’ of 3 types, called Tree, Flower and Grass.

Tree:

Flower:

Grass

Robot planting is about having the robot to move the ‘plants’ to the designated boxes of 3 types: Recreational, Industrial and Town. During the competition, the organizers will announce which boxes are for the Tree, Flower or Grass. Each plant is of a different mass and different frictional coefficient. Thus, we needed to prepare programs for each plant to each box, which makes for 18 separate programs in total. And because the performance of the robot deteriorates with decreasing battery power, we made a total of about 30 separate programs for the competition. The competitor is supposed to take a 'plant', mount it on the robot, and the robot should send the 'plant' and return to the start box. This is repeated until the time runs out, or when all the 'plants' are 'planted'.

This was the original robot we built. No gears, simple, quick to build, less risks of mis-tracking:

We added a few additional ‘shurikens’ (as it looked like the Japanese ninja weapon) to the front of the robot to make sure we abide the rule of ‘any part of the robot must be over the black line’, and to prevent the ‘plant’ from slipping out of the robot holding area.

We could complete the mission easily with this robot. Unfortunately, we heard that some other schools were achieving mission times that were much lower than us, which was a real wake up call. Thus, we added gears that increased the speed of the robot to about 1.5 times. Increasing the speed of the robot changes a lot of things. Programs need to compensate for such speed, the grip of the wheels may be easily compromised, and the chances of going off the track is much increased.


The addition of gears were done using our experience from the previous open category project. We knew that gears, especially gears that speed things up (as opposed to reduction gears that slow down the rpm) need to be secured firmly to each other, otherwise the robot would fail, especially with the program we used to run the robot. The organisers did supply a sample program which was as orthodox as possible. 'Forks', lots of them. We needed to speed things up, so we devised a program with many 'wait for dark/light' switches, plus a preprogrammed motor sequence that utilised the rotation sensor in each motor. Thus, if the gears were loose (i.e. cogs not touching with each other), the motor would run without the wheels running, making the robot inaccurate and causing the whole mission to fall apart. Thus, we secured the gears as best as we could, by mounting the gears on a large main structure utilising several 'L' bars and straight bars that were secured to the NXT on at least 6 points. The final configuration of the robot during the Tawau Local Competition looked like this:

We removed the 'shurikens' which were deemed redundant, and equipped the robot with several 'sticks' at the side to make sure it was always over the black line. This might be called trickery, but we weren't the only ones doing it, as it allowed for much faster movement. A fighter pilot's adage is to Lie, cheat and steal in the cockpit. Leave chivalry hanging in the closet with your dress whites.

This video was made by my teacher, and showed some of the rather outrageous designs by other teams for the robots to stay 'on track':





During the local competition, my team won Gold, by a very small margin. We had about 940 points, while the team who won Silver had about 10 points less than us, basically equal to 10 seconds slower time, or an extra penalty with part of a plant remaining outside the destination box. The regular category of NRC is usually a close fight, and while we got the upper hand in the Tawau Local competition, we did not make it to the national levels. The winning team from Kota Kinabalu had 10 points more than us. I would've gladly competed again with them, but (reportedly due to budget constraints) that year's competition format did not accommodate a state-level competition for our category. By points comparison, we won Silver in the state level.

That's all for now.

No comments:

Post a Comment