Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Simple Simon

GEN II Robot Soccer


EV3
Training Curriculum
Brian Thomas

**LEGO, Mindstorms and Robolab are Registered Trademarks of the LEGO Corporation

RoboCup Junior Australia Inc Copyright 2015 1


Get Started in GEN II Soccer

You will find that GEN II Soccer is no harder than any other robot competitions. It is
actually easier for beginners to enter and compete successfully in Soccer! They can then
raise their expectations and skill levels as they compete. The use of IR Beacons is not a
compulsory item for beginners to purchase or master, it just adds a further dimension of
control for the robots and programmers when they get to that stage.

It is a common misconception that a lot of technical equipment is needed to compete in in


GEN II. Teams starting out have the most fun if they build and program a Simple Simon
Soccer Player or two and just compete!

Equipment needed for a Simple Simon Soccer Player Team:


2X LEGO Mindstorms EV3 45544Kits
2X Tris10 Infrared Seekers or Hitechnic IRV2
1X Hitechnic Pulsed Soccer Ball

Have a look at http://www.teaching.com.au/catalogue?catalogue=MTA&category=MTA-


ROBOCUP-ROBOTICS-COMPETITIONS . There is a great deal where you can get started in
Simple Simon for little more than the price of two NXT Kits! There are also great sensor
deals for beginners if you look at the MTA catalogue.

The Simple Simon Approach


Build a Riley Rover robot from http://www.damienkee.com/home/2011/8/20/domabot-
classroom-robot-design.html or a Tommabot from http://www.robocupjunior.org.au/tutorials

Add an infra red sensor and a bull bar and you are ready to go

Program a Simple Soccer Robot(or two) from the notes below. A Simple Soccer Player that
can find the ball and kick it will be competitive in most GEN II League Tournaments. It does
not necessarily have to use a compass.

Build a goalie using an EV3 or NXT light sensor. These sensors will pick up a pulsed ball from
40 cm if they are calibrated correctly. Change the Simple Soccer Player Program to just
move forwards and back when it sees the ball. That way it will it will remain in front of the
goals.

You do not need a GEN II field to practise on at this stage. Just mark out the field
dimensions and goals on a mat, or the carpet of the classroom floor and develop your soccer
team on this.

RoboCup Junior Australia Inc Copyright 2015 2


Simple Simon GEN II Soccer
Simple Simon is intended as an introductory level game of GEN II Soccer. It will give novice
students a feel for the GEN II games and tournament conditions. State Committees will be
running Simple Simon competitions if enough interest is shown. Simple Simon will not be
offered at a national level.

Aims
To make GEN II Robot Soccer accessible to all students.
Limit the need to purchase specialised equipment in order to compete in GEN II
Maximise participation of students.
Minimise the infrastructure needed for GEN II Soccer games.

Rule Modifications
The following modifications can be made to the RCJA GEN II Rules.
1. Teams will have a maximum of two Hitechnic IRV2 or Tris10 sensors.
2. All other sensors must come from Mindstorms EV3 or NXT kits.
3. Only Mindstorms NXT-G or EV3 software can be used.
4. Games will be 5 minute halves with no half time break and 4 minutes break between
games.
5. All programming should be done prior to the tournament.
6. If the ball hits the side wall, play will continue.
7. If lack of progress is called, the ball will be replaced to the nearest neutral spot.
8. Damaged robots can only be removed with the referees permission.
9. If a robot is in a situation where it is about to kick an own goal, it should not be
removed.
10. A damaged robot remains off the field for 30 seconds or until a goal is scored.
11. Any team that is not ready to start a game will lose a goal per minute for being late.
The game clock will start at the scheduled time and the game will run according to the
tournament schedule. Forfeits result in a 5-0 score line
12. Teams may not be given setup areas if accommodation is limited. They will use the area
around the allocated field to program robots (if required)
13. Only one laptop and two robots will be brought to the field area. No spares or tools
are to be used. One chair and one powerpoint will be made available to teams.
14. Robots and laptops are to remain in the field area once the tournament has begun.

Follow the training notes below and you will be playing GEN II in less than 2 hours.

These notes use the Tris10 Findball IR sensor as it is easier to show the programming
features of EV3 with this. The Hitechnic IRV2 sensor can easily be substituted into
these programs and by adding the 4 extra direction readings.

Any questions queries or comments, contact: b.thomas@ccg.vic.edu.au

RoboCup Junior Australia Inc Copyright 2015 3


Finding the Ball: The Mexican Wave
Overview
The first part of playing any ball game is to find and chase the ball. This unit allows your
robot to chase the ball when it is in front of the robot.
If you get all of the robots in the class, you can create a Mexican wave of robots.
It is assumed that you have a minimal knowledge Mindstorms EV3 programming.
It is recommended that you go through this exercise as it ensures that all sensors and
motors are plugged in their correct position and working.

Robot Setup
Build a Tommabot add a bull bar and a Hitechnic IRV2 Sensor.
All that you need is motors plugged into outputs B and C and the IR Sensor plugged into
Sensor Port 1.
You need to download the IRV2 Sensor block from the https://www.hitechnic.com/downloads
site and follow the download instruction. It is quite easy!
Programming
In this program the IR Sensor is just waiting for a reading from the ball and then the robot
will be told to move forward.
Create the following simple program that will allow you to see that everything is working OK.
Start with a loop. Leave it at the unlimited(loop for ever setting).

Add a switch to inside the loop

RoboCup Junior Australia Inc Copyright 2015 4


Programming(cont)
Now change the switch from Touch Sensor to Logic.
Add a Compare block
Select 3 as you threshold Value
Add a Hitechnic IR Seeker V2 Block
Wire the blocks up as shown above
Insert a Move Tank icon into the True branch of the switch.
Select On for Seconds
100% Power Forward for both motors
Set time for 1 Second
Brake at End
Your programming area should look something like this..

The robot will do nothing until the IRV2 gets a reading greater than 3. Then it will take the
top path (True) of the switch and move forwards
Save this program on your computer as MW.

Select download and Run in the right bottom corner of the programming page. This gets
you to the correct section of the EV3. I always do this first time I run a program, but always
hold onto your robot when you do this, it may get away from you.

The robot should do nothing at this stage

Place all of the class robots with their backs to the classroom wall
The teacher will turn the ball on and roll the ball across the classroom.
Did you get a Mexican Wave?
Try rolling the ball further away from the robots. Which robot has the best range?
RoboCup Junior Australia Inc Copyright 2015 5
Notes
The pulsed ball has an incredible range and also can be sensed by reflection off walls.
Experiment with the location of your IR V2 sensor and maybe shield it with black tape to
reduce the influence of reflections and still maintain the excellent range.

You will find the IRV2 sensor gives the following readings.
If you go to Port View in the on your EV3 or on your EV3 Programming screen,

you will find that the following readings are recorded.

Hint: if your readings do not change when you move the ball, you may need to unplug and
reinsert the Hitechnic IRV2 Sensor

At this stage you can experiment with the placement of the LEGO pieces around the sensor
to give you consistent readings. You will be amazed at the sensors ability to see through
the LEGO. This should be repeated every time you add other attachments such as dribblers
and kickers.

RoboCup Junior Australia Inc Copyright 2015 6


Simple Simon Soccer Player
Overview
You will now add another switch to the program from the previous unit. With this, you can
now scan for the ball and chase it, no matter where it is on the field.
Robot Setup
All that you need is motors plugged into outputs B and C and the IRV2 plugged into Sensor
Port 1.

Programming
Place an ultrasonic switch in the True branch of the switch in the Mexican Wave program
Set the first switch to greater than 3
Set the second switch to greater than 6
The means that for the lower branch the, sensor readings will be 0,1,2,or 3 meaning that the
ball is to the left of the robot.
The middle branch is for sensor reading 4,5 and 6 meaning the ball is straight ahead.
The top branch is for readings 7,8 and 9, meaning the ball is to the right of the robot.

RoboCup Junior Australia Inc Copyright 2015 7


Programming(cont)
Place the Move Tank icon from the Mexican Wave unit the middle branch. This should
send the robot forward at full power for 1 second.
Add a steering icon to the top and bottom branches.
Select On and 50 % power.
Adjust the steering slider to turn left for the bottom icon and turn right for the top
branch.
This is the Simple Simon Soccer Player. It will allow you to have fun and play a game
of GEN II Soccer. Save it and keep it in case your more complex programs fail.

Adjustments for Improvement


A fast robot will beat other robots to the ball. However if a robot is scanning too quickly it
may scan past the ball and miss it when it is straight ahead.
Increase the speed of the turn until the robot scans past the ball.
Go back to your previous setting and use this as your optimum scan speed.

Experiment by clicking the Switch to Tabbed View icon

You will see that only one of the branches will be displayed. To view the other branch just
click on the True or False icons Notice how much room this creates on your screen?

RoboCup Junior Australia Inc Copyright 2015 8


Ball Chase

Overview
You are now ready to use the full facilities offered by the EV3 programming and the Tris10
sensor to keep the ball under control once you have it, and dribble it down the field.

Robot Setup
You will now need to modify your robot to retain the ball. Read the rules on
www.robocupjunior.org regarding robot size and ball capturing zones and build a bull bar
that will help to control the ball.
You still only need to have motors plugged into outputs B and C and the IRV2 Sensor plugged
into Sensor Port 1.
Method
The Simple Simon is not totally smooth. This program utilizes the 9 IR sensor readings allows
you to adjust how sharply the robot is turning and gives your robot a command to go directly
at the ball.
Programming
Start with a new program
Start with a loop. Leave it at the unlimited(loop for ever setting).
Place the IRV2 block from the yellow palette inside the loop
Add a switch and this time select Numeric from the drop down menu
Wire the IRV2 block to the switch by left clicking and dragging the cm jigsaw block to
the # slot.

Now we can use a new feature of the EV3 software,


RoboCup Junior Australia Inc Copyright 2015 9
Click on the + symbol on the switch. Repeat this 8 times.

Label each section starting at the


top 9,8,7,6,5,4,3,2,1,0

Now inset the steering motor icon into each of the


steps.

Adjust each of these according to the following


page.

*Note if you see the ultrasonic sensor included in


images, this is just for the Tris10 sensor. Ignore it
and continue to use the IRV2 block.

RoboCup Junior Australia Inc Copyright 2015 10


RoboCup Junior Australia Inc Copyright 2015 11
Method
A common problem for robots is that they continually get stuck on the walls or against the
goals. The reason for this is that the program does not have a reverse command in it. If a
robot is stuck against the wall it can be assumed that the robot cannot see the ball.
Consequently this is an ideal time to get the robot to reverse and to turn around.
Programming
Select Tabbed view on your switch to now give yourself a bit of room on the screen.
Click on the 0 tab at the top of the switch to get to the only branch that should be blank
at this stage. Add two Move Steering icons to the branch.
On the first icon, Select On for Seconds
Power -100 for both motors
Time for .3 .5 second
On the second icon
Steering 70-100
Power 50-100
Time for .3 .5 second to get the robot to turn from 90 -180 degrees according to
your needs

How well does your robot go now???

You will need to adjust the motor power and turning direction for each of the 0-5
settings depending on how your robot behaves.

The above method can also be used on the Hitechnic IRV2 sensor, but you will need to
set 10 branches for 0-9 readings.

RoboCup Junior Australia Inc Copyright 2015 12


Simple Simon Goalie
Overview
It is always an advantage to have a robot that will remain in front of the goals. Simple
mathematics can tell you that a 22cm goalie in front of 45 cm goals will cut the chances of
the opposition scoring a goal by close to 50%. Of course the rules state that this robot must
react to the ball in a forward direction.
The IRV2 will detect the ball for the full length of the field. This is not ideal as the goalie
should only react to the ball when it is within kicking range. It is actually an advantage to
build a goalie using an NXT light sensor. These sensors will pick up a pulsed ball from 40 cm
if they are calibrated correctly. You just need to program the goalie to just move forwards
and back (and kick) when it sees the ball.
Many thanks to the Grade 4 students of Scotch Oakburn College in Launceston for testing
and refining this program.
Robot Setup
You will need to have motors plugged into outputs A and C and an EV3 Colour sensor plugged
into Sensor Port 2.
Colour Selection
The robot will see the infra red ball as black on the colour sensor.
This has a range of over 1 m.
You do not want the robot to chase the ball when it is down the table.
You may need to angle the colour sensor downwards to reduce its detection range.
Programming
Start with the loop function
Then place the switch inside the loop
Following this, place two Motor controls in the upper fork of the switch

RoboCup Junior Australia Inc Copyright 2015 13


Set the Switch to Colour Sensor-Measure -Colour
Set the top branch to black and the bottom branch to no colour and select the default
button(important)
Set Motors to B and C and get them to run forwards 100%, then backwards - 100% for
.5 seconds each
Set the Loop Control to Forever
Try doing the Mexican Wave with the other robots in the class.
Adjust the angle of the sensor so that the robot only responds to the ball when it is
50 cm away.

Scanning For the Ball


It is desirable that the robot scans only the 180 degrees forward of the goal it is
protecting. Consequently if it goes out to kick the ball, it will need to continue its scan from
where it left off. This is achieved by scanning in small increments and by counting the
number of times it does this. That way after the robot responds to the ball, it can return to
its position in front of the goal and continue scanning from that count.

Programming
Add another loop at the start of the program.
Drag the light sensor loops to inside the first loop and place them side by side.
Add a Move Steering icon to the lower branch of the switch.
Set the steering to turn full left,
Motor Power 50,
Timer to .05 seconds.
Select Coast to stop (important)
Set the light sensor loops to count for 40 and the outside loop to loop forever.

RoboCup Junior Australia Inc Copyright 2015 14


Test the program. The robot will scan to the left and attach the ball when it is close.

Copy and paste the sensor loop to beside the first loop.
Change the motor icon on the lower branch to turn right.

RoboCup Junior Australia Inc Copyright 2015 15


Adjustments for Improvement
Change the count of both light sensor loops so that the robot is scanning exactly the
same amount and close to 180 degrees.
The robot must not move from its spot in front of the goal after responding to the
ball. You must adjust all timings so that the robot remains in position after at least
two minutes of play.
If a robot is scanning quickly it can reduce its ball detection ability.
Vary the angle of the sensor and the scan speed to get optimum performance.

RoboCup Junior Australia Inc Copyright 2015 16

You might also like