'Our family engineering project this week is a Lego Mindstorms Dancing Robot. This was a good programming project for the kids to program a robot dance routine.' 'Robotics is a challenging subject to teach, and Mindstorms helps to remove some of the difficult barriers and to engage kids quickly with fun and interesting projects. Dec 3, 2016 - MINDSTORMS SUMO BOT COMPETITION RULES. Robots can use one NXT or one EV3 brick and up to four motors and four.
NXT Programming, Lesson 8 NXT Programming Lesson 8, sumo wrestling LEGO robot In this lab session we will construct and program a sumo wrestling LEGO robot and at the end of the lab session the sumo wrestling LEGO robots will fight against each other in a sumo arena as described in Figure 1. Figure 1 Two LEGO robots are ready to start a wrestling fight. The fight ends when the loosing robot is pushed out of the arena or is overturned. If this does not happend in 2 minutes the fight ends as a draw. Based on the ideas in, a fotobased building instructions for a, a simple LEGO sumo wrestler can be build (click on the image to see details): The LEGO sumo wrestler consist of the four modules: a base car, a rear castor wheel, a light sensor and a pusher (click on the images to see details): The four modules can be build after the building instructions:,. The four modules are assembled as follows with a motor and sensor wiring that prevent wires to stick out (click on the images to see details): LEGO robot that exhibits several behaviors Try out the program on the sumo wrestler LEGO robot in the sumo arena. The classes needed to run this program are in.
Observe the robot and try to identify the different observed behaviors that the robot exibits and the circumstances that triggers the different behaviors. Look at the LCD and try to interpret the output. Behaviors as concurrent threads Fred Martin describes how a control program for a robot can be structured according to the reactive strategy, 2. He give en example of such a program with three different behaviors as shown in Figure 2.
![Lego Lego](/uploads/1/2/5/6/125627660/709049228.png)
Each behavior is described with two components: a condition that triggers the behavior and actions that are performed when the triggering condition is true. Figure 2 A reactive control strategy with three behaviors, 2. The SumoBot program is also structured according to the reactive strategy. In the program there are three behaviors that are very similar to the behaviors in Figure 2. They are: AvoidEdge, Turn and Drive. If you look into the program you will see three objects corresponding to the three behavors: Drive d; Turn t; AvoidEdge ae; Each of these objects are threads created and started by the main program.
Thereafter the threads run concurrently with the main thread. Each of these threads represent a single behavior: Drive makes the robot drive forward, Turn turns the robot a random angle on the spot every 5 seconds, and AvoideEdge try to avoid the edge of the sumo arena. Look into the three classes and try to identify how the triggering condition is implemented in each of the classes and how the actions for each behavior is implemented. Class Behavior Each behavior thread is an extension of which is an extension of Thread. What is the purpose of making these threads daemon threads as done in the constructor of the Behavior class? Figure 3 Behaviors have prioritized access to the motors by means of a suppress mechanism, 1. In the Behavior class a suppression mechanism has been implemented so that only one behavior at a time can have access to the driving motors.
When a behavior wants to have access the suppress method is called to suppress access from lower priority behaviors to the driving motors. The method release is called when the behavior no longer needs access. The suppression mechanism were inspired by Rodney Brooks subsumption architecture, 1.
An instance of the class SuppressNode is used by other behavior threads to suppress motor commands from this behavior. How is this instance variable used to implement a suppression mechanism in to obtain controlled access to the motors?
Compare this with the arbiter of Fred Martin, 2, page 214-218. Add a behavior OverturnOpponent Mount an ultrasonic sensor in front to detect the opponent and a motor to drive a mechanism that can overturn the opponent when the robot is close enough to the opponent. Look into for building inspiration. Add a behavior OverturnOpponent to the SumoBot program. References 1, A robust layered control system for a mobile robot, IEEE Journal of Robotics and Automation, RA-2(1):14-23, 1986, also, September 1985. Martin, Robotic Explorations: A Hands-on Introduction to Engineering, Prentice Hall, 2001.
Last update: 4-04-13.