Chapter 21. Searching for Precision

Solutions in this chapter:

Introduction

This chapter is dedicated to contests based on some specific capability. Occasionally, speed is important, too, but not so much as in the competitions described in Chapter 19, and although two or more robots may perform at the same time on the same field, physical contact is not the main goal, as was the case in the competitions discussed in Chapter 20.

These capabilities include what we described in Part I as the most challenging tasks for NXT robots: finding and grabbing objects (Chapter 11), and knowing precise positioning (Chapter 13). The need to use them in a contest makes your mission even more demanding: You must consider the interference that comes from sharing the playing field with other robots that may voluntarily or involuntarily disturb the action of your robot. The recipe for success is the same as that proposed in the previous two chapters. This applies to any kind of contest: Study the rules, define a strategy, make a few assumptions about the opponents, build a prototype, experiment with it, test the software carefully ... and rebuild everything from scratch until you are satisfied. In other words, you need some ideas, some skills, and lots of patience!

The last challenge described in this chapter—RoboCup Junior—shows an interesting variation on the theme of object finding: It is the object itself—the ball—that guides the robot to its position, through the emission of IR light. You will discover that this change in the nature of the problem is enough to simplify the robot’s requirements considerably, to the point where its software isn’t so different from that used to implement the simple light-following algorithm.

Precise Positioning

The challenge of precise positioning requires that your robot go, or return, to a specific point. The robot whose degree of error is smallest, wins. You can define many implementations of that simple statement, each one with its own peculiarities. As always, even a small change in the rules can have radical effects on the difficulty of the challenge. A very simple version is: Starting from a predefined point, the robots must move forward until they hit an obstacle, then turn in place 180 degrees and return to the spot where they began. The obstacle will be the same, at the same distance from the start for all the robots, and the contest may require many runs with different distances. It’s important that the rules specify that the robots must turn 180 degrees before returning to the starting point; otherwise, most of them will simply go in reverse!

If you’re the one who decides the rules, calibrate the difficulty of the contest by setting the limit on the number of parts admitted. For example, a dual differential drive can be very precise, but requires two differential gears. Limiting the equipment to just the NXT set will make the contest fair to a larger number of participants, but more difficult.

Have you any initial ideas about how you would make a precisely turning robot with only NXT parts? At this point in the book, you should have many ideas. However, let’s do this exercise together. Starting from the mobility configuration, you can proceed by a process of elimination: A simple steering is easy to make with parts from the standard NXT set, but the small radius of turn and the lack of Ackerman’s steering correction introduce unpredictable slippage, which is very bad for precise positioning. A differential drive won’t work because of the lack of a differential gear in the standard set. So, you end up using a tribot with one caster wheel.

A tribot with a caster wheel requires that you use a synchronized feature of the NXT servo motor to run the robot along a straight line, relying on the caster to turn smoothly while one of these motors rotates at a different speed to turn the robot.

With any solution, you may manage to go straight, but you still have to turn precisely 180 degrees. This is the most critical point, because even a small error in the angle will leave your robot very far from the starting point. Do you remember what we said about tuning the turning capability of robots in prior chapters? Use the distance between the wheels to adjust the turning angle so that you have predictable encoder values of the NXT servo motor to make a U-turn. Take some trial runs, and get a feel for the encoder values you will need to make such a turn. Monitor the encoder and control this rotation of the motor to ensure precise turning. Thorough testing is, as always, your ticket to success.

A challenge based on positioning may be made significantly more complex by simply adding more segments and checkpoints to the route. For example, instead of a round trip, you can prepare a triangular path—ask the robots to stop in any vertex and measure the deviation between their actual positions and the expected ones. Each robot should have an easily identifiable part to use as a reference point for measuring the starting and ending points of the journey—for example, a vertical axle with one end very close to the ground.

Shooting with Precision

In summer 2006, NXTasy.org created and hosted an innovative contest called “Throw Me!”. The contest required participants to throw a blue plastic ball from the NXT set as far as possible. The contest was worldwide and was open to all users with an NXT set. There wasn’t any specific place for the event and the participants had to send documentation of their robot, including video and pictures showing the robot’s performance. The participants prepared their own field which, among other things, was required to have a calibrated line to measure how far the ball landed.

The challenge was simple, but required the ball to land within about 5 centimeters of the line! Think about it—when the robot threw the ball, any small deviation in the throw was going to be magnified multifold when it landed. To land close to the line, the throw had to be reproducible with near-zero deviation! The challenge was a feat of robot precision and strength at the same time.

A few months later, Mr. Barak took the prize with a whooping score of 11 meters. The robot used a rotating arm that hit a free-falling ball. The rotating arm was allowed to build momentum before the ball fell. The positioning of the ball, its fall under gravity, and the point at which it touched the rotating arm were adjusted so that it would be thrown as far as possible. It landed 11 meters from the robot—right on the 11-meter marker! You can find more details, images, and video at the NXTasy.org Web site (see Appendix A).

Fine Motor Skills of Your Robot

First Lego League, popularly known as FLL, has used innovative ideas for creating contests. These contests motivate participants to refine their robots’ fine motor skills. The Nano Quest theme of the 2006 FLL season is another noteworthy contest. Participants have several missions to accomplish, and limited time to accomplish them (for details, see Appendix A). It’s a daunting task to make a robot that can accomplish all the missions in this contest. Chances are the winning team will have accomplished all of them, but rookie teams will probably plan which missions to accomplish, and if time permits, they may stretch beyond to accomplish additional missions. Several times, the robots would have interchangeable modules to accomplish specific missions. Time is critical, and thinking in terms of a single module to perform more than one mission helps significantly.

Removing the Bricks

For the Individual Atom Manipulation mission from this contest, the robot has to remove at least one white brick from a blue platform without removing any red bricks. The platform has eight red bricks and eight white bricks. To get any points, the robot has to leave all eight red bricks behind; leaving behind fewer than eight red bricks results in no points!

This is a complex challenge that requires that your robot be able to:

  • Navigate the field and find the platform.

  • Ascertain the correct bricks.

  • Remove at least one brick from the platform.

Moreover, the platform is suspended on four rubber bands, so a hastily approaching robot could knock everything down and lose points. Fortunately, plenty of aid is available for the robot to reach the platform without bumping into it. All the navigation techniques described in prior chapters would be an asset here. The field setup table has an edge, which is distinctly black. The field mat has several lines and colored markings which represent landmarks for absolute positioning, as described in Chapter 13. The positioning of sensors on the robot needs to be well thought out, as there is not much space to maneuver around the platform.

The next difficulty comes from the bricks. The white bricks are in a predictable position and they are tall, attributes on which a robot could strategize. But in order to rely on that, the robot needs to be precisely positioned on the field. Any misalignment quickly knocks the bricks over as the robot reaches them. If a brick falls off the platform, the team gets the point. But if the robot just knocks it over and it remains on the platform, the brick is almost impossible to remove (see Figure 21.1).

The Atoms Platform

Figure 21.1. The Atoms Platform

Freeing the Magnets

The Atomic Force Microscopy is another challenging mission. The robot needs to free a stuck nanotip. The nanotip has a magnet and so does the base, and they are stuck together, forcing the nanotip to be bent into position.

Again, the robot needs to navigate the field, find the nanotip, locate its stuck magnets, and free them. The navigational challenges are the same as those discussed in the preceding section. Moreover, the robot has to be fitted with a module to separate the two magnets. You may think that you could use the same module that removed the bricks to separate the magnets, but alas! The base magnet is attached to the bottom mat, and with that technique, instead of separating the magnets, the mat lifts up. You really need a two-hands approach to hold the base magnet down while lifting the top magnet.

The team NANO RATS, which took the winner’s trophy at the Virginia State Championship this year, had some simple strategies for dealing with these challenges. Sally and Bill Sylvester, coaches of the team, said their team made a robot with attachments on both sides, and to achieve some missions, the robot ran in reverse. That saved them some time in terms of exchanging the attachments. They reduced their initial four minutes of run time to accomplish six of nine missions to two and a half minutes. For the state championship, they had their robot optimized so well that they had a few seconds left to do one more mission and get additional points.

The team relied quite heavily on synchronized motors to run their robot in a straight line. Remember how to compute distance traveled based on number of rotations? The one with ’PI’ in the formula? That was the method they used to ensure that their robot stopped at the right place. They launched the robot from the base, pointing to the mission, and programmed the robot to run straight to the precise location and then operate on the mission (see Figure 21.2).

The Nano Rats' Robot Approaching the Stuck Nanotip

Figure 21.2. The Nano Rats' Robot Approaching the Stuck Nanotip

Note

Another factor that plays silently in robot precision is battery voltage. If you’re running your robot using timing, it is important to maintain consistent battery voltage. You can do this by fully charging up your rechargeable battery before each run or maintaining a supply of batteries kept at a consistent voltage. Fortunately, the new NXT servo motors include built-in encoders that you can use to ensure greater precision for distance and turns, even at varying battery strength.

Fire Fighting in a Maze

Trinity College in Connecticut hosts a Fire Fighting Contest which is open to all kinds of robots. The participating robot needs to find its way through a maze that represents a house, find a lit candle that represents a fire, and extinguish the candle. Points are awarded based on several criteria, including shortest time (for details, see Appendix A). Unlike the FLL field, for the most part, the maze flooring is a featureless terrain and has no markings to aid in navigation. Instead, there are walls, so you could use several of the techniques we discussed in Chapter 17 to navigate the maze. Simply sliding the robot along the walls would work, but there are penalty points for that. Several of the robots use ultrasonic or infrared sensors to determine distance from walls.

Finding and extinguishing the candle is also challenging. The robot could use a light sensor to detect the flame, but it needs to be fairly close to the candle before it can reliably detect it. In doing so, there is always a fear of bumping into the candle and tipping it over. The candle is encircled with a line at a 30 cm radius, which could aid in determining when to stop. In fact, per the contest rules, the robot must step inside that arc before extinguishingthe candle. Blowing air to extinguish the candle is another option. That would work for a candle, but it’s not a reliable proposition for a real-life fire.

Because the competition is open to all, we should mention the difference between NXT robots and other robots. In general, non-NXT robots have options for integrating high-powered batteries and motors with sophisticated processors and sensors, which helps to improve precision and speed. On the other hand, the ease of building robots using the NXT is undeniably an advantage for first-time entrants.

Playing Soccer

RoboCup Junior is a simplified form of soccer, a rather suitable game for small robots. The robots don’t actually kick the ball, but instead push it toward the goals. The required capabilities are similar to finding an object (a ball), and knowing where you need to take it to reach the opponent’s goal (see Appendix A for Web site details). The field is covered with a simple linear gradient, black at one end and white at the other, and there are walls all around, with goal posts. All of this can be used in navigation.

The ball is a special, active ball: Made of clear plastic, it is filled with infrared LEDs and batteries to be detected by light sensors. With a light sensor, the robot can turn in place until the sensor reads the expected value, which would be the direction of the ball.

The field mat gradient can be used with the techniques we described in Chapter 13. This geometric pattern has the property that, if you follow the darkest path from any point, you arrive at the black edge, whereas if you choose the lighter path, it drives you to the white edge. Using this gradient, it’s very easy for robots to reach their desired goals by employing a very simple navigation algorithm.

The program is not too difficult to write. Make your robot turn in place, searching for the ball until it finds it (the algorithm is actually very similar to a light-following algorithm). If it doesn’t find it, make it move a bit in any random direction and look around again. When you find the ball, move the robot forward to catch it and then start moving toward the opponent’s net.

Summary

The competitions we talked about in this chapter require some capabilities that we described in Chapter 1-13 of the book as being the most challenging to implement: finding objects, directing with precision, knowing where you are, and navigating precisely.

If these activities prove difficult to implement when you build a robot for yourself, situating them in the context of a competition makes your mission even more difficult. This happens because you must push the performance of your robot to its maximum. You have to consider all the details, optimize the software, and reach the highest possible level of reliability and precision.

The soccer competition we described in this chapter is a good example of how a few changes can radically affect the solution to a problem. It also shows the practical application of two techniques described in Chapter 13 regarding absolute positioning: the use of an IR beacon, and a pad with a special pattern that eases navigation.

These challenges require complex behavior composed of many different actions that need to be coordinated together well. If you decide to take up the challenge, we suggest that you think of both your hardware and your software in terms of subsystems. This way, they will be easier to test, debug, and maintain. You also could design your hardware modules to be interchangeable during the competition to perform different missions. In addition, you could make your program modular with a top-level program that manages small subroutines corresponding to the basic actions the robot has to perform: navigation, object detection, and object collection. Mastering this kind of challenge won’t be easy, but as with most difficult things in life, your satisfaction will be directly proportional to the effort you expend!

 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.36.221