NXTG Workshop for Bottle RoboSumo Lawrence Technological University Rules 1. Game Objective and Synopsis First robot to intentionally push the bottle off the table OR Be the last robot remaining on the table 6. Game Match Rules If the robot moves during the first 3 seconds, the robot automatically loses the game Robot Configuration for this workshop Left Motor B Left Light Sensor 2 Ultrasonic Sensor 4 NXT Brick Right Motor C Right Light Sensor 3 Remember the connections! Left Motor connects to B Right Motor connects to C Left Light sensor connects to port no. 2 Right Light sensor connects to port no. 3 Sonar sensor connects to port no. 4 Move “Forever” Will the robot move forever? Download and test this program Downloading Programs Make sure your robot is plugged in, and turned on, then click the down arrow. Running a Program Press the orange button to run your program and go down a menu level Press the dark gray button to stop your program and go up a menu level Use the arrows to view choices in this menu level Move “Forever” Did it go forever? Why not? This Does Work Put the Move block in an infinite loop. Moving Backwards Column 1 20 0 Row 1 Row 2 Row 3 Row 4 Column 2 Column 3 Spin Light Sensors Light Sensor Readings Connect the robot with the USB cord Place light sensor 3 over the edge of the table A number between 0-100 is displayed here Now place it over the table Enter the average of those numbers here Finding the Edge Finding the Edge Use your mouse to draw a green data wire Put a Move block outside the loop in the Stop direction Try out the program! Problems If your robot stops too soon or too late, try adjusting your light sensor value We only are looking at one light sensor – what if the other one goes off the table first? Finding with Both Sensors Finding with Both Sensors Finding with Both Sensors Simple Sumo without detecting objects (sumo1.rbt) Ultrasonic Sensor Measures the distance to the closest object Uses sonar waves like a bat Can be used to see if an object is within a certain range of the robot Finding the Bottle Sumo2.rbt – Simple Sumo with object detection Wait for a second 3 second wait is required when the game starts Test sumo2 For the qualifying round, each robot will be placed on a table with two bottles. Practice! Did your robot find both bottles? Did it spin around forever? We can avoid it spinning forever by using a Timer block For the tournament, there will be two robots and one bottle on the table at a time. Practice! Try improving your program so you can win sumo! Timer Whenever you use a timer, it’s always a good idea to reset it first Wait to play a sound using the timer Physics of sumo • Your robot will be more effective at pushing other robots off the table if you use • • • • • Mass Velocity Force Torque Power Mass • m=mass, v=velocity, p=(linear) momentum • p=m*v • F=force, a=acceleration • F=m*a • If we increase the mass, we increase the momentum and force • Where to add mass? Consider the center of gravity (should be low and inside wheel base) Velocity • m=mass, v=velocity, p=(linear) momentum • p=m*v • If we increase the velocity, we increase the momentum • The larger the momentum, the more Force is required to change the acceleration • How do we increase the velocity of the robot? (With the motor) Force • • • • T=torque, r=wheel radius Torque=Force*radius Force=Torque/radius How do we increase the Force? • Increase the torque • Decrease the radius (smaller wheels) Torque and Power • P=Power, T=Torque, w=angular velocity • P=T*w • T=P/w • How do we increase the torque? • Increase the power (Motor power) • Decrease the angular velocity • Make sure batteries are fully charged! • We can increase the torque by “gearing down” Build a better robot (later) • Sturdy construction • At least 2 attachment points for each part so robot stays together • Compact design • Triple pegs on multiple beams • Wheel base • Wide base for slow turns • Narrow base for fast turns • Which is best for stability of robot? Robot design (2) • Wheels • • • • How many with tires? 2 or more? Tires- rubber or plastic? (for traction?) Size – large or small? Placement of wheels – front or back? Robot design (3) • Sensors • Placement of light sensors (height above table? How far in front or to side of wheels?) • Placement of sonar sensor (low or high?) • Use additional sensor(s)? • • Touch sensor(s) to detect if an opponent is pushing your robot? Touch sensor(s) to detect if you are pushing an opponent or the bottle? Strategy • • • • Try to lift an opponent off the table? Try to hide from an opponent (cloaking)? Bounce off an opponent if attacked? Add a motor to power a mechanical device to attack your opponent (try to flip your opponent over)? • The best strategy is to find the bottle first!