`
`..viQ._....__l.
`
`.a..
`
`.9...
`
`‘fifiififl.
`
`i§“R{:3b§;‘J;1‘§‘!:Cj Sumwg.
`
`
`
` 526
`
`Chapter 27 - Hand-to-Hand Combat
`introduction
`
`The contests described in Chapter 26 are the kind where each competitor has its
`turn, and the results compare the individual performances. In this chapter, we’ll
`talk about competitions where the rival robots fight face to face in a more spec—
`tacular way.
`In our experience, Sumo is one of the most suitable kinds of competition for
`small robots, offering the opportunity to test an incredible range of techniques‘
`that may prove useful in all your projects, not just during contests.We will take a
`look at variations on some familiar solutions—like bumpers and proximity detec-
`tion—and will introduce some new ones. For example, we will explain how to
`alternate the use of a single light sensor to look down to detect the edge of the
`playing field and to look ahead to search for the opponent, and we will illustrate
`a transmission which behaves like a sort of automatic gear switch.
`Although the technical aspects of building a successful Sumo robot are
`important, the design requires much more than simply putting together a few
`mechanical solutions: it requires a strategy. Wifl your robot be very aggressive, or
`do you prefer a defensive approach? It could be robust and slow, or lightweight
`and fast. It could be designed to actively search out its opponent, or to react
`when it’s under attack.You cannot work at the mechanical configuration and
`decide how the robot should behave after it’s finished. On the contrary, you have
`to pick up a strategy and design both the mechanics and the program according
`to it.This principle applies to any robot, but it is particularly important for Sumo
`robots, and it is the key to understanding this chapter:'\X/e want you to devote the
`proper attention to the connections between the planned behavior of your robot
`and the solutions you can adopt to effectively implement it.
`
`Building a Robotic Sumo
`We explained in the Introduction that when you start building a robot for a
`Sumo contest, you must have a strategy in mind.The process starts before
`building your robot. It begins by examining the rules carefully, understanding
`what you can and cannot do, and deciding your line of action.You must try to
`imagine what the opponents’ strategy can be, and plan your robot to be able to
`resist their attacks and take advantage of their weak points. Obviously you cannot
`really know how the other competitors will strategize and behave, but this exer-
`cise helps you to focus on a well—defined strategy. Remember that any strategy is
`better than no strategy at all!
`
`
`
`
`
`
`
`527
`
`Hand-to-Hand Combat ° Chapter 27
`
`
`
`
`
` :1)VIE‘5’Lb\:i‘fi:L'(u1¢:fl1'fxLV-=r.§E\vLi£5n:EL\€"vfi'?.‘:rfivni-§iI\?"7:‘X§‘”".‘
`
`>'ELh'f:R:‘.‘15£:'!
`
`
`
`
`
`
`
`This section starts by describing a typical set of rules, which will help you in
`naming what a Sumo contest is, and provide a starting point in case you want to
`organize your ovvn.Then we’ll describe how you can tune your robot to produce
`maximum force, which is undoubtedly a very important component in a Sumo
`competition.We will also explain how to configure your robot to take advantage
`of some important offensive and defensive behavioral strategies.
`
`Setting the Rules
`
`During our Italian LEGO Users Group (ItLUG) meetings we organized robotic
`Sumo tournaments based on two separate sets of rules.The first set of rules states
`that the robots can be made out of any original LEGO piece, in any desired
`quantity, but that they must be within a maximum size of 32 X 32 studs and a
`
`maximum weight of 15kg (3lbs). In the alternative set of rules, which we called
`Mini Sumo, each robot may be built using only parts from a single MIND-
`STORMS set; there is therefore no need for size and weight constraints.
`For most other aspects the two sets of rules are almost the same:
`
`The field is a circular or square pad with a contrasting external strip of
`20cm (8 inches). Usually the pad is white and the strip black, or vice
`versa.
`
`Only two robots can fight on the field at a time. Should one robot for
`any reason find itself outside the field boundaries, that is, any portion of
`it touches a point beyond the external strip, the robot loses the round. If
`neither robot is eliminated within a chosen time limit (e.g., 3 minutes),
`the match ends in a draw.
`
`E A robot may also be eliminated if it is overturned by its opponent or it
`finds itself in a situation where it can no longer maneuver.
`
`M No “violent” behaviors are allowed. A robot can only push or lift its
`opponent. It is in no way allowed to damage its opponents structure or
`parts.
`
`A robot cannot drop any part or subsystem in the field either deliber-
`ately or involuntarily. Any part found loose on the field will be removed
`by a member of the panel.
`
`|‘J,\....__L<.Av\
`
`
`
`
`
`B The robots must be fully autonomous; any kind of remote control is
`forbidden.
`
`
`
`
`
`Chapter 27 - Hand-to-Hand Combat
`
`528
`
`5 Every robot must comply with the limits in size and weight at the
`beginning of a match, but once the match starts, it can modify its own
`structure, perhaps extending parts so itself so its dimensions become
`larger than the initial specified size limits.
`
`There are many other less important rules covering items like batteries, com-
`position of the panel, pre—match test time, and more. Some Sumo competitions
`require that your robot pass an admission test: It should be able to push a block
`of wood out of the fighting ring. If it can’t beat a block of wood, it has little
`chance against another robot, and this rule is meant to screen out robots too
`weak to enter the contest.We never enforced this rule during our Italian Sumo
`contests, and have to admit that it’s quite possible a block of wood might have
`been able to win a few matchesl
`
`
`
`Maximizing Strength and Traction
`
`The making of a strong Sumo robot requires much more than just brute force,
`but we cannot deny that maximizing the generated push will increase your
`
`chance of winning some matches and maybe the tournament.
`When optimizing the pushing power of your robot, the first thing you need
`is an objective way to measure it.V/ithout measuring the force, the improvements
`you make are subjective and as a result are very inaccurate. During the prepara-
`tion for the first ItLUG robotic Sumo contest, our friend and robot builder
`
`Sergio Lorenzetti suggested a simple trick based on a Very common object: scales,
`like those used in many kitchens to weigh flour, sugar, or other ingredients.
`You have to place the scale on its side on the table or the floor, possibly
`removing the upper tray, and hold it firmly while your robot pushes against it.
`You’re not interested in the absolute Value that the scales indicate, but rather in
`
`comparing the push produced by different setups.
`There are many factors that affect this force; you can imagine a sort of path
`of power that goes from the batteries to the wheels, passing through the motors
`and the gearing, decreasing in accordance with the variables that affect each part
`along the path (see Figure 27.1).
`We already talked about batteries in Chapter 26; the rules will hopefully
`specify that all competitors use the same kind of commercial batteries. Between
`the batteries and the motors, there’s the RCX. It’s worth reminding you once
`again, that the RCX incorporates a current~limiting device to protect the motors
`connected to its output ports. If the rules allow the use of extra parts and you
`have them, you can consider the option to connect the main motors to a battery
`
`
`
`
`
`
`
`
`
`Hand-to—i-iancl Combat ° Chapter 27
`
`box and a polarity switch, thus implementing the indirect control described in
`Chapter 3.
`
`Figure 27.1 Limitations on Force
`
`
`
`‘a..:3wz-.».-:e«av.»«uy.;-is:«.v;~:gm«.«s:«:s:asus.se:-exvx;
`
`
`
`
`1wHmmn«».~w»->..»«»J:1RJv(v:‘I.U‘,.=....-V\‘\l1‘..
`
`
`
`
`
`
`
`l
`
`
`
`The number of motors influences the generated power. Simply use the max-
`imum allowed by the rules and by your own inventory. As for the mobility con-
`figuration, the differential drive allows for the highest combination of
`maneuverability and simplicity. The fact that it doesn’t go perfectly straight is not
`relevant to Sumo fighting, and the dual differential drive has no advantages in this
`case. On the contrary, the ability to use one motor to turn and the other to move
`reduces the maximum generated force.
`The optimal gearing is, as always, easier to determine by experiments than by
`calculations. Generally speaking. the higher the reduction ratio, the higher the
`push, but this doesnt mean you should gear down too much. Speed has its
`importance (we’ll explain why later in the chapter), and very high reduction
`ratios introduce too much friction. which uses up precious power.
`Now we come to the part where you have to convert the produced torque
`into actual push.The wheels are a critical coniponent: if they don’t grip the pad
`well, the rest of your efforts will prove fruitless.This is when the scales we men-
`tioned earlier prove an enormous benefit. By testing different kinds of LEGO
`wheels, you’ll discover that there are significant variations in grip. The ones from
`the 8462 Tow Truck work particularly well, as well as the large spoke wheels con-
`tained in the i\/llNDSTORl\/lS kit. On no account should you use tracks.They
`offer extremely low grip, and almost no grip at all in the direction perpendicular
`to its motion.You’d have little hope at all if your opponent broadsided you—an
`eventuality more probable than a head—on collision.
`Ifpossible, try to test your robot on a surface similar to the coritest’s official
`pad. Different materials require different wheels. For example, the wheel having
`the best grip on a smooth tabletop is not necessarily the one with the best grip
`on a rough plywood surface.
`
` :: :i[g§rj;_1,(oG
`
`
`
`A
`
`uh-.‘»'.A.LJcI.uLuK‘D1.i
`
`
`
`-..u..i_.cA.;...yé:.a
`
`
`4
`
`:11.3
`
`?‘
`
`'=
`
`
`
`
`
`Chapter 27 ° Hand-to-Hand Combat
`
`
`
`The position of the center of gravity is also Very important when it comes
`to friction and your wheels. Keep the COG as close as possible to the main
`drive axles.
`
`
`
`I
`t
`V
`r
`i 5¥5li?A¥Q;r5§T¥"lV»l*?*l3?ll¢.3P€“.?‘?.§‘1e ifiiwtefét a
`
`
`‘
`'
`‘
`;sed{"oi5r__;th_e pa’ umlatic-_enfgirre_of’iv
`
`
`
`
`
`
`
`
`
`
`haatode
`V
`
`
`
`or§;téstA.'
`eke
`bl
` .. . o . . . , g’éar€l1:C¥ll39..l:l\_3F?¥“ll‘il7§l.Xl5
`
`
`
`
`
`
`ghiriefféa blef r;:»ovef<:'c{me4"-miosfit
`'
`i€S tfijidpét
`
`
`sa.de#by-;si«de -;s:a’r:,.;‘-with j
`"
`L
`,—3ilhtri§;tfu_C‘eUl/
`
`
`
`
`i
`
`
`
`
`
`Attack Strategies
`
`We anticipated that force Wouldn’t always make the difference in a robotic Sumo
`contest.There are many different strategies that can affect the result and cause :1
`robot to win out against a more powerful competitor. These include finding the
`enemy first, using speed as a force, using a gear switch for m:u<:in1u1n speed and
`push, and other offensive tricks.
`
`Finding the Enemy
`
`A Very important rule is: find your enemy before he finds you.This basic military
`principle applies to Sumo robots as well, for the simple fiict that the first one to
`engage the other has a good chance of attacking it on :1 weak side. Sunio robots are
`
`
`
`
`
`
`generally designed to push forward, and ofier much less resistance when attacked
`from the side or rear. in fact, they often don’t even realize they’re under attack,
`because oftentimes they’re not designed to detect the enemy from behind or from
`the side. In such cases, you can say that three sides out of four are generally weak.
`The problem is that finding the opponent is more easily said than done.
`Unless your rules allow custom sensors, what you have in your toolbox isn’t
`much. Proximity detection is a good option (see Chapter 4), but remember that
`you also need the light sensor to detect the outer strip so as not to commit “sui-
`cide” by going outside the circle.When a single light sensor is allowed, you
`should alternate it face down and face fiont, depending on the situation. Guido
`Truffelli successfully implemented this trick in his robot in order to win our first
`Mini Sumo tournament, using only two motors as required by the rules. Figures
`27.2 and 27.3 show a small assembly that explains how this works: one of the
`motors of the differential drive is connected to a differential gear instead of
`directly to the wheel.\7(/hen the robot goes forward, the differential gear rotates
`the light sensor downward until it gets stopped. From that moment on, the sensor
`cannot rotate anymore, and all the power goes to the wheel. Reversing the direc-
`tion of the motor——for example, to turn in place——~the sensor offers less resistance
`than the wheel and comes up until blocked again. Guido’s robot thus had two
`chief states: a search phase, when it turned in place with proximity detection
`active, and a motion phase, when it advanced with the sensor facing down.
`
`
`
`
`
`Hand-to-Hand Combat - Chapter 27
`
`Figure 27.2 Flipping Light Sensor Assembly (Top View)
`
`
`
`
`
`iuE=r§€a:KF‘»‘:7rF:2é:1¥Sil:'£WE=lT4:£iv‘r‘I:3¢nir'v‘:%-‘r'=:'i:-M
`
`
`
`
`
`
`
`...i.i.i..._..»..,...-.41..A..."u.,;...,,i._Lrz».JumA4an
`
`
`
`
`
`
`
`Chapter 27 ° ‘Hand-to-Hand Combat
`
`532
`
`Figure 27.3 Flipping Light Sensor Assembly (Side View, Left Wheel Removed)
`
`
`
`
`
`Speed is an ezxztremely important factor in the search for the enemy Imagine two
`robots running freely on the Sumo field, simply going straight until they find the
`border and change direction randomly. Supposing that they have different speeds,
`the fister of the two has a much greater chance of intercepting the other. For this
`reason, it’s important not to have too a slow robot. Find a compromise between
`pushing ability and speed.
`Carrying this to the extreme, Roberto Francia made speed the main weapon
`of his robot Lancillotto (Lancelot). Crashing into the opponent at high speed, the
`robot used its momentum instead of its strength.The energy released in the
`impact made the opposing robot lose contact with the ground, pushing it back a
`short distance. One assault after the other, Lancillotto charged repeatedly, like a
`ram, until. its poor Victim was pushed ofil the field. (Incidentally, Roberto’s robot
`Was fast, but not so flist as to be considered illegal in terms of the rule against
`
`
`A sim ler, but 'ust as effective techni ue em lo 5 Contact sensors, either in
`P
`J
`9
`Y
`the form of bumpers or antennas. Bumpers don’t require any particular tricl<;.You
`simply program your robot to turn toward the obstacle instead of avoiding it.
`Design compact and smooth bumpers devoid of any unnecessary protrusion, to
`reduce the chances of getting caught on an enemy robot and dragged off the
`playing surface.‘%X/ith antennas you can use either touch or rotation sensors, the
`latter beino able to tell on more about the direction of the o
`onent.
`::
`Y
`PP
`Using Speed
`
`
`
`
`
`Hand-to-Hand Combat ° Chapter 27
`
`destroying the opponent!) Ranking second at his first contest, Roberto’s robot
`demonstrates that even beginners may teach the “experts” something.
`
`OTE
`
`Momentum is a physical quantity defined as the product of mass times
`velocity. You can understand what it means through an example: You
`‘face a person of your same weight and build that's trying to knock you
`down. If you're both stationary, you have a good chance to resist. If, on
`the other hand, you are stationary and the other is running towards you,
`you will very likely go down.
`
`
`
`
`._.,......._...u‘th.x...qyn;.A-n..£‘o.4an::v:2ua£a.nu.U...zn_rJ..:}.AmluwymL£\i.LL‘mdLA$I5£.'h"fi
`
`\«.L*t..u_..£4.I£.'E}4.e.:n;.hk»iiiQAlmyxnd£kuJMu'.u3l:m.Lal..‘.«,;mt:..S.‘Lmw-}u.L_\iwMvi-LLyL<..
`
`
`
`Using a Transmission
`Other robots use a transmission to get the best ofboth worlds: fast speed during
`the search phase, and 1119.XlI1’!,Ll1’I1 push after the engagement. Our robot Golia ll
`used a transmission. very similar to that described in Chapter 14, based on the
`special transmission ring. But Sergio Lorenzetti demonstrated during a contest
`that its possible to make a sort of automatic. gear shift even inside the strict rules
`of Mini Sumo. Look at the assembly in Figure 27.4, it’s notlvery solid, but
`explains the principle:The wheel on the right in the picture is geared with a
`shorter ratio than the main one, and during normal motion it slips a bit because
`the robot is moving faster than the speed of the idler Wheel.\X/hen the robot
`slows down for any reason, the faster Wheel slips, and at that point, the slowest
`one grips. Since it’s mounted on a short independent beam with a free end, part
`of the torque pushes the wheel clown and consequently lifts the robot.
`Remember to add a part to stop that short beam when almost vertical. (We
`didn’t include it in the picture because We wanted to keep it clearer.)
`
`Other Sumo Tricks
`
`
`
`
`
`There are many other tricks that prove useful during a Sumo contest.The ones
`most often used are meant to lift the opponent, thus getting two positive effects:
`reducing or canceling the grip of its Wheel and transferring part ofits weight on
`your robot.This class of method includes at least two large families, one based on
`
`inclined planes and the other on counter~rotating wheels.
`
`
`
`
`
`534
`
`Chapter 27 - Hand-to-Hand Combat
`
`Figure 27.4 An Automatic Gear Switch Assembly
`
`
`
`slower whee!
`(engaged if faster wheel siips}
`
`
`
` /
`
`faster wheel
`(normaiiy engaged)
`
`An inclined plane Works like a wedge that slips under the enemy robot. It can
`have the shape of some small slopes placed at the front side of the robot, or of a
`large inclined surface that covers the whole robot. In this latter case, a LEGO
`baseplate is the better choice: mount it studs-down and you’ll h
`ave a very smooth
`top surface to Wedge under your opponent.
`Counter-rotating wheels are very effective, too, but require an additional
`motor to operate them. Be sure they don’t touch the ground though, otherwise
`they’ll counteract the forward motion of your own robot! The combined effects
`of the front Wheels with the push of the robot may e
`ven overturn the opponent,
`a spectacular but rare event.
`
`Getting Defensive
`
`So far We have discussed attack strategies, but protecting the weak sides of your
`robots is important as Well.
`‘
`Every active defense system relies on the fact that you know whats happening
`around you, and require some sensor to detect a possible attack. Depending on the
`rules of the tournament, you might find yourself dealing with a limited number of
`input ports, requiring that you carefully plan out how to allocate them in regards
`
`
`
`
`
`
`
`Hand—to—Hand Combat - Chapter 27
`
`to your navigation, attack, or defense subsystems.The simplest detecting system is a
`sort of large bumper that covers a whole side of the robot. If you have enough
`touch sensors, you can connect them in parallel so as to monitor three sides with a
`single port. in this case, you’ll know you’re under attack but won’t be able to tell
`what side it’s on.
`
`When you detect you’ve been tackled, you have the option of either escaping
`or facing your enemy. The first choice is best when fighting a slow, strong oppo~
`nent, while the second works well when it’s your robot that has a strong push
`(though its not always easy to turn in place when being pushed). Some rules
`allow the competitors to use more than one program. Take advantage of this
`opportunity by preparing different versions to implement different strategies, then
`select the one most suitable when you know which robot you’ll be facing in a
`
`~:‘¢.éz:ie%~.:t-zsusm-u-:r¢.~:4.-.&.L=.<y.\:e—,:=~,«.»a-.=~'~1-l:«~
`
`given match.
`Also consider passive defense systems, the kind that doesn’t require any sensor
`or port. The more obvious defense mechanisms revolve about the shape and size
`of the robot itself. A smaller robot offers less surface area to an opponent than. a
`larger one, and though a triangular shape is more difficult to build, its also more
`difficult to catch. Make the perimeter somehow convex if you can, so as not to
`offer any holds that will help your opponent. Clearance from the ground is
`important for the same reason: it reduces your ene1ny’s chances of Wedging itself
`under your robot.
`More sophisticated passive defenses include protruding beams or axles meant
`to keep the enemy away from your robot’s Vital organs, freewheeling vertical
`wheels on the sides to neutralize lifting wheels, and free horizontal wheels to
`allow your robot to slip away when engaged on one side.
`
`
`
`testing Your Sumo
`This phase is crucial to a good result. Start testing your robot on a pad similar to
`the tourna1nent’s to make sure it doesn’t do stupid things in the most common
`situations. lt should detect the edge of the field when reaching it from any angle:
`You can’t imagine how many robots won a match because their opponents killed
`themselves?
`\lVhen everything works Well, you can start more advanced testing.You really
`need a sparring partner, but it need not be a second robot. Many reasons suggest
`you use a fake robot as a sparring partner, something you can move by hand to
`create any situation you want. (Using a ‘eal robot, you’d end up testing both
`instead, plus you risk not being able to control specific scenarios.) A simple box
`
`
`
`
`
` Chapter 27 - Hand-to-Hand Combat
`
`does the trick, or a heavy book. Start by leaving the fake robot sti.ll in the middle
`of the field, and see what happens.Your robot should find it, sooner or later, and
`push it off the pad.When this works, move the fake robot yourself to test the
`defensive strategy of your robot, and its behavior at the edge of the pad, the most
`dangerous area.
`Remember that the perfect robot doesn’t exist. For any winner of a contest,
`it’s possible to design an “antidote” robot capable of beating it.Yo_u just have to
`accept some compromises in your project and make some assumptions about
`your opponents, hoping they Won’t prove too far from reality.
`
`Summary
`If you have no previous experience in robotic Sumo, you may think of it as a
`competition based solely on brute force.We must confess that we also had many
`preconceptions our first time out at a competition of this kind, but had to change
`our mind. Force is indeed important, but it ty
`pically proves useless when up
`against a good deal of intelligence.
`These competitions have nothing in common with the kind of events that
`feature radio—controlled machines, called “robots,” that try to destroy each other.
`These are not robots, simply because they totally 1c
`'
`autonomy.
`The first important lesson that this chapter teaches is that you must design
`your robot with a strategy in mind, choosing the configuration that best suits
`your goal. Start examining the rules, then make a hypothesis about your oppo~
`nents and devise a strategy to beat thein.Your opponents may be very different
`from how you imagined them, but this is not irnportant—vvl1at’s important is that
`you build and program your robot to be consistent with the strategy you chose. A
`perfect robot doesn’t exist; in fact, situations in which robot A beats robot B,
`which then beats C, which in turn actually beats robot A, are very common in
`contests. And they’re what make contests so interesting and instructive.
`We hope you also understand the secondpimportant message of this chapter:
`When building and programming your robot, make reliability your first priority.
`Ifyou can beat a block of wood in a Sumo match, you’re halfway to success.’