RoboSumo Tournament semester 1 2018-2019 – 2pm Wed 5/12/2018

This semester’s RoboSumo tournament
takes place at 2pm,
Wednesday 5th December 2018
in room KEG-036, DIT Kevin St

Click here for Live Tournament ranking
(Note: All rankings are provisional and subject to change)

Please review the following information carefully from start to finish.

Tournament time and location

The tournament will commence at 2pm on Wednesday 5th December 2018 in room KEG-036, which is located in one of the smaller side corridors on the ground floor of the main building in DIT Kevin St. Weigh-in and robot validation will take place from 14:00-14:30. The first bouts will commence at 14:30. During the initial “sorting” phase of the tournament, competitors will be divided into two pools, each of which will be assigned to one of the two competition arenas. Within each pool, sorting will proceed based on the bubble sort process previously described in class. The initial ranking will be determined by the results of the Tip the Can competition.

The exact duration of the tournament will depend on how quickly things progress, but we aim to be completely finished by 5pm. To ensure that the tournament proceeds efficiently, teams must comply with the instructions of the referee(s) without dispute at all times.

Robot Weigh-in – 2:00pm in KEG-036

Before your robot can compete in any sumo bouts, it must weigh-in and be measured to ensure compliance with the competition rules.

  • The weight limit is 500 grams, as measured using the electronic scales in room KEG-036. This includes every part of the competing robot, including batteries.
  • The size limit is 10 cm x 10 cm when viewed from above (no part of the robot is allowed to be outside this boundary). The size limit will be strictly applied.

Teams should present their robots for the weigh-in at 2:00pm in room KEG-036. One of the tutors will act as compliance officer, managing the weigh-in. He/she will run through a checklist with each team.

Sumo Bouts – 2:30pm in KEG-036

From 2:30pm onwards, teams should be continuously present in room KEG-036 and ready to compete immediately whenever summoned to one of the arenas. When a referee summons two robots to the arena for a bout, if one robot is ready to compete but the other is not (e.g. the team fails to present themselves at the arena, or the robot is non-compliant, or the robot is non-functioning) the first robot will be granted a walkover victory in that bout. In that case, however, the losing team remains eligible to compete in subsequent bouts (until they are eliminated from the tournament).

Submitting Your Robot for Formal Assessment – KEG-036

Once your team is eliminated from the competition (or has won!), you must submit your robot for assessment. This is critically important for your final grade. The compliance officer (or another tutor) will be managing the submission of robots and will run through the following checklist with each team:

  1. Have you submitted your robot? A clear label showing the robot’s name should be securely attached. Suitable labels will be available in KEG-036.
  2. Optional: have you attached a 1-page feature guide to your robot? This sheet can be used to highlighting interesting design features that might not be immediately obvious to the assessment panel during the design assessment. There is no special format for this page – if you’re including one, just make it clear, fold it up, and attach it securely to your robot.
  3. Have you provided a completed robot information sheet? This sheet includes: team/robot name, team number, tutor name, name of every team member, blog address of every team member. Blank paper copies of the robot information sheet will be available in KEG-036.

Please do not leave without submitting your robot. Doing so may have a catastrophic effect on your grade.

DIT tournament rules

The RoboSumo tournament rules are those of the Robot Challenge “Mini” class, mostly as described in the Robot Challenge rules PDF document. However, those rules make provision for tournament organisers to introduce local rule changes as appropriate. The following rule variations apply in the DIT RoboSumo tournament:

The beginning of each bout:

  1. Infrared starting devices are not required (and generally are not used). Instead, each team nominates a single team member as the designated starter for each bout. The designated starter manually starts the robot at beginning of each bout, as instructed by the referee. The specific method of starting the robot is left up to each team – flicking a switch, pressing a button, inserting a wire, inserting a battery, etc. – but whatever method is used, the robot must remain stationary until it is started.
  2. The referee positions both robots before the bout begins. Ordinarily, the referee will place the robots in opposite quadrants of the arena, each facing in a direction other than that of its opponent. However, the starting position and orientation of each robot within the arena is entirely at the discretion of the referee.
  3. Once the referee has positioned the robots, each robot must remain stationary until the referee says “Go”.
  4. When the referee says “Go” each team’s designated starter starts his/her robot.
  5. The designated starter is only allowed to start the robot – he/she may not change the position or orientation of the robot in the arena.
  6. Once the designated starter has started the robot, he/she must withdraw from the arena and have no further contact with the robot until the bout ends.
  7. The designated starter may not touch his/her robot after it has begun moving (or has moved from its initial position).
  8. The designated starter may not touch his/her robot after the opponent robot has made physical contact with it.
  9. The designated starter may not touch the opponent robot at any time.

The end of each bout:

  1. The duration of each bout is limited to 30 seconds.
  2. If both robots remain in the arena when the time limit for the bout expires, the referee will decide the winner based on each robot’s distance from the centre of the table (the closer the better), robot activity/behaviour during the bout, attitude/behaviour of each team during the bout, and/or other criteria at his/her own discretion. The referee may explain the criteria upon which the winner of a bout was chosen, but is not required to do so.

Other rules:

  1. When a bout fails to produce a clear winner, the referee may, at his/her own discretion, order the bout to be replayed.
  2. During the sorting phase of the competition, matches will consist of a single bout. However, in the latter (knockout) stages of the competition the number of bouts in each match increases (best of 3 or best of 5).
  3. The dimensions of each arena will be similar to those described in the Robot Challenge rules (77cm diameter with a 2.5cm white border), but may deviate slightly from them. However, the white border will not be less than 2.5cm in width.
  4. A robot which displays no responsiveness to its opponent or its surroundings for a significant period of time may, at the referee’s discretion, be disqualified from a bout. In particular, please note that robots which simply spin on the spot will be viewed very unfavourably by the referees unless they exhibit other behaviour which provides evidence that the spinning forms part of a meaningful control strategy.
  5. Each team’s robot spending limit is €70. This figure must include the cost of all components included in the final robot, as it is presented for the tournament validation process, with the following specific exceptions. The €70 budget does not include the cost of components or materials purchased but not used in the final robot. It does not include any cost incurred for postage and packing. Most recycled materials which are obtained free of charge do not need to be accounted for in the robot budget, but specialised components which would not be available to other teams through normal scavenging (e.g. remote control servos) may need to be represented by an indicative cost. In general, the referees do not systematically verify the cost of every robot, but where a specific dispute arises or it is suspected that a robot may be in breach of this rule, a team may be asked to provide evidence of their total spending (e.g. by providing receipts or showing where each component used can be purchased for the claimed price). Where a team is suspected to be in breach of this rule and cannot prove otherwise, the referees may apply a penalty of some kind or even disqualify a robot from the tournament.

Important note: Every effort has been made to compose the rules of each bout and the structure of the tournament as a whole in a way that is fair and consistent, but since it is impossible to anticipate every eventuality, the referee(s) must have ultimate discretion to overrule any regulation or introduce a rule change at any time.

Tournament structure

The tournament is divided into two main phases – a sorting phase and a knockout phase. Each team must also complete a validation process prior to competing in their first match.

Validation process

The validation process ensures that each robot complies with the restrictions on size and mass imposed by the Mini class rules. Teams who do not successfully complete the validation process are not eligible to compete in competitive bouts and can therefore only move down in the tournament ranking. Teams who are unable to field a compliant robot may still be asked to compete in one or more exhibition bouts for assessment purposes, but they cannot progress to the knockout phase of the tournament.

  • The mass of the robot, including batteries and all parts which will be attached to the robot during a bout, must not exceed 500 grams.
  • The footprint of the robot must not exceed 10 cm by 10 cm. Specifically, the entire robot and all parts attached to it, must fit within a cuboid (with vertical sides) of 10 cm width and 10 cm depth. Height is not specifically restricted. Note that robots are permitted to expand beyond their 10cm by 10cm footprint after the start of a bout, as described in the Robot Challenge rules.
  • All ground contact points that bear the weight of the main body of the robot must fit within the 10 cm x 10 cm footprint throughout the entire bout. It is permissible for parts of the robot to touch the ground outside the 10 cm x 10 cm footprint once the bout is underway, but the weight of the main body of the robot must not rest on them.

Following validation (the “weigh-in”), if a team makes any change to their robot which increases its size or mass, they must repeat the validation process prior to competing in a match.

Sorting phase

The initial ranking will be determined primarily by the results of the Tip the Can challenge. The objective of the sorting phase is to select the top 8 teams. A variation on the so-called bubble sort will be used for the majority of the sorting phase. However, the referee(s) may deviate from this pattern at his/her/their own discretion to resolve any unforeseen ranking issues or anomalies.

In each of the two pools (odd and even), the sorting phase will continue until the referee is satisfied that he/she has identified which 4 teams should progress from that pool to the knockout phase of the tournament.

Knockout phase

The 8 top-ranked teams will proceed to the knockout phase of the tournament. When a team loses a match in this phase, they are eliminated from the tournament. The referees will decide the number of bouts per match in each stage of the knockout phase (ordinarily best of 3 bouts, apart from the final which is best of 5 bouts).

Laboratory access during the tournament

  • There will be no RoboSumo lecture from 2-3pm on the day of the tournament. Instead, teams will proceed directly to KEG-036 at 2pm for the tournament weigh-in.
  • Access to laboratories other than KEG-036 before 3pm on the day of the tournament will be subject to the limitations of the timetable for each laboratory (other classes may be timetabled in some rooms before 3pm).
  • Room KEG-036 will be open from 2pm onwards. However, space may be limited due to re-organisation of tables for the tournament.
  • The normal lab facilities will be available from 3pm onwards, to facilitate teams who wish to carry out repairs or adjustments to their robots. However, bear in mind that if the referee summons you to a match and you are not present, your opponent will be granted a walkover victory. The live ranking spreadsheet can provide a guide to when each team is likely to be called to compete.

Competitor check list

Inevitably, many teams will face technical issues on the day of the tournament, and it’s impossible to foresee every problem. However, there are certain issues which we see every year:

  1. PLEASE PLEASE PLEASE ensure that your robot is compliant with the size and weight limits. Yes, 101mm is too much! And yes, 501 grams is too much! To avoid unexpected problems, please leave some margin for error. We need to be absolutely strict about these limits and butchering your carefully crafted robot at the last minute to reduce its size or weight can be a heartbreaking experience.
  2. If you haven’t already tested your robot actually driving around, please do so BEFORE the tournament. Bizarrely, every year we see teams who leave it until the very last minute to attach the wheels to their motors for the first time. Unfortunately, many of them discover at that point that their gearing is totally inappropriate and the robot cannot actually move.
  3. Focus on the basics. This means getting your robot moving around and responding to its sensor(s).
  4. Make sure your robot doesn’t simply spin around the spot for the entire bout. This behaviour will be viewed very unfavourably by the referee.
  5. Make sure you bring spare batteries.

Finally, remember to get plenty of photos and videos of your robot (and team) in the run up to and during the tournament. Of all the evidence you will provide on your blog, photos and videos are some of the easiest to create, and they can really help to tell the story of your project.

Finally, best of luck to all of you!

Advertisements
Posted in Uncategorized | Leave a comment

Some check list items for the final week of preparations…

The DIT 2018-2019 semester 1 RoboSumo Grand Tournament takes place on Wednesday 5th Dec 2018 at 2pm in room KEG-036. Ther following are some check list items that we discussed in today’s lecture:

  1. Make sure your robot is fully compliant at the weigh-in (500g, 10cm x 10cm). The size and weight limits will be applied very strictly and non-compliant robots will not be allowed to compete in the tournament.
  2. Your robot must be fully functioning and ready to weigh in and compete at 2pm on the day of the tournament. When one of the referees calls two teams to the arena, if one team presents a functioning robot and the other team fails to do so promptly then the functioning robot will be awarded a walkover victory.
  3. All robots must be submitted (with accompanying paperwork) for formal assessment at end of tournament. The tournament will therefore be your final opportunity to capture photos or videos of your robot that you can include in your blog.
  4. The deadline for RoboSumo blogs is 5pm on Friday 14th December 2018 (week 13).
  5. Please capture photos and videos of your robot competing in the tournament.
  6. If there are specific design features of your robot to which you would like to draw our attention during the formal design assessment, you have the option of securely attaching a 1-page feature guide to your robot when you submit it at the end of the tournament. Where such a sheet is provided, we will read it when we inspect and discuss your robot. If your robot has subtle or ingenious design elements that might pass unnoticed, this provides a simple way of ensuring that they will be taken into account.
  7. A set of rules for the tournament will be posted on robosumo.wordpress.com before the day of the competition.

Posted in Uncategorized | Leave a comment

State Machine example code

// State Machine example for RoboSumo
 
// function prototypes
void forward();
void reverse();
void motors(int, int, int, int);
float distance();

int state = 1;
 
void setup()
{
  // Motor pins
  pinMode(2, OUTPUT); // Left motor foward
  pinMode(3, OUTPUT); // Left motor reverse
  pinMode(4, OUTPUT); // Right motor foward
  pinMode(5, OUTPUT); // Right motor reverse
   
  pinMode(6, OUTPUT); // trigger pin for rangefinder
  
  // Assume colour sensors are
  // FLS: front left sensor on A0
  // FRS: front right sensor on A1
}

void loop()
{
  unsigned long t;
  int fls, frs;
  float rf;
  
  while (state == 1)
  {
      // read sensors
      fls = analogRead(A0);
      frs = analogRead(A1);
      rf = distance();
      
      // set motors
      forward();
      
      // Change state?
      if (fls > 512) state = 2;
      if (frs > 512) state = 3;
      if (rf < 60) state = 4;
  }
  
  while (state == 2)
  {
      // read sensors
      frs = analogRead(A1);
      
      // set motors
      motors(0, 0, 1, 0); // LM stop, RM forward
      
      // Change state?
      if (frs > 512) state = 5;
  }
  
  while (state == 3)
  {
      // read sensors
      fls = analogRead(A0);
      
      // set motors
      motors(1, 0, 0, 0); // LM forward, RM stop
      
      // Change state?
      if (fls > 512) state = 5;
  }
  
  while (state == 4)
  {
      // read sensors
      rf = distance();
      
      // set motors
      forward();
      
      // Change state?
      if (rf > 60) state = 6;
  }
  
  t = millis();
  while (state == 5)
  {
      // read sensors
      // n/a
      
      // set motors
      reverse();
      
      // Change state?
      if (millis() - t > 2300) state = 6;
  }
  
  t = millis();
  while (state == 6)
  {
      // read sensors
      rf = distance();
      
      // set motors
      motors(1, 0, 0, 1); // LM forward, RM reverse
      
      // Change state?
      if (rf < 60) state = 4;
      if (millis() - t > 5000) state = 1;     
  }  
}
 
float distance()
{
  int duration;
  float dist;
   
  // Send trigger pulse
  digitalWrite(6, HIGH);
  delayMicroseconds(20);
  digitalWrite(6, LOW);
  
  // Wait for start of echo pulse
  while (digitalRead(7) == 0);
  
  duration = 0;
  while (digitalRead(7) == 1)
  {
    duration = duration + 10;
    delayMicroseconds(10);
  }
  
  dist = 0.5 * 1e-6 * duration * 340.0;
   
  return dist;
}
 
void motors(int lmf, int lmr, int rmf, int rmr)
{
  digitalWrite(2, lmf);
  digitalWrite(3, lmr);
  digitalWrite(4, rmf);
  digitalWrite(5, rmr);
}
 
void forward()
{
  motors(1, 0, 1, 0);
}
 
void reverse()
{
  motors(0, 1, 0, 1);
}
Posted in Uncategorized | Leave a comment

Programming examples from today’s lecture

The following examples illustrate various useful techniques you might choose to use when you program your sumo robot.

Motor control functions:

// Example of a motor control function

// function prototypes
void forward();
void reverse();

void setup()
{
  // Configure pins
  pinMode(2, OUTPUT); // Left motor foward
  pinMode(3, OUTPUT); // Left motor reverse
  pinMode(4, OUTPUT); // Right motor foward
  pinMode(5, OUTPUT); // Right motor reverse
}

void loop()
{
  forward();
  delay(1000);
  reverse();
  delay(1000);
}

void forward()
{
  digitalWrite(2, HIGH);
  digitalWrite(3, LOW);
  digitalWrite(4, HIGH);
  digitalWrite(5, LOW);
}

void reverse()
{
  digitalWrite(2, LOW);
  digitalWrite(3, HIGH);
  digitalWrite(4, LOW);
  digitalWrite(5, HIGH);
}

An example of a function with arguments (input values):

// Example of a motor control function

// function prototypes
void forward();
void reverse();
void motors(int, int, int, int);

void setup()
{
  // Configure pins
  pinMode(2, OUTPUT); // Left motor foward
  pinMode(3, OUTPUT); // Left motor reverse
  pinMode(4, OUTPUT); // Right motor foward
  pinMode(5, OUTPUT); // Right motor reverse
}

void loop()
{
  forward();
  delay(1000);
  
  reverse();
  delay(1000);
  
  motors(1,0,0,0); // left motor forward, right motor stop
  delay(2000);
}

void motors(int lmf, int lmr, int rmf, int rmr)
{
  digitalWrite(2, lmf);
  digitalWrite(3, lmr);
  digitalWrite(4, rmf);
  digitalWrite(5, rmr);
}

void forward()
{
  motors(1, 0, 1, 0);
}

void reverse()
{
  motors(0, 1, 0, 1);
}

An example of a function with a return value:

// Example of a function with a return value

// function prototypes
void forward();
void reverse();
void motors(int, int, int, int);
float distance();

void setup()
{
  // Motor pins
  pinMode(2, OUTPUT); // Left motor foward
  pinMode(3, OUTPUT); // Left motor reverse
  pinMode(4, OUTPUT); // Right motor foward
  pinMode(5, OUTPUT); // Right motor reverse
  
  pinMode(6, OUTPUT); // trigger pin for rangefinder
}

void loop()
{
  float d;
  
  d = distance();
  
  if (d < 0.5)
  {
    reverse();
  }
  else
  {
    forward();
  }
}

float distance()
{
  int duration;
  float dist;
  
  // Send trigger pulse
  digitalWrite(6, HIGH);
  delayMicroseconds(20);
  digitalWrite(6, LOW);
 
  // Wait for start of echo pulse
  while (digitalRead(7) == 0);
 
  duration = 0;
  while (digitalRead(7) == 1)
  {
    duration = duration + 10;
    delayMicroseconds(10);
  }
 
  dist = 0.5 * 1e-6 * duration * 340.0;
  
  return dist;
}

void motors(int lmf, int lmr, int rmf, int rmr)
{
  digitalWrite(2, lmf);
  digitalWrite(3, lmr);
  digitalWrite(4, rmf);
  digitalWrite(5, rmr);
}

void forward()
{
  motors(1, 0, 1, 0);
}

void reverse()
{
  motors(0, 1, 0, 1);
}

An example showing how to use the Arduino millis() function:

// Example of the Arduino millis() function

// function prototypes
void forward();
void reverse();
void motors(int, int, int, int);
float distance();

void setup()
{
  // Motor pins
  pinMode(2, OUTPUT); // Left motor foward
  pinMode(3, OUTPUT); // Left motor reverse
  pinMode(4, OUTPUT); // Right motor foward
  pinMode(5, OUTPUT); // Right motor reverse
  
  pinMode(6, OUTPUT); // trigger pin for rangefinder
}

void loop()
{
  unsigned long t, duration;
  
  // Remember what time we started driving forward
  t = millis();
  
  // Drive forward until distance is less than 10cm
  while(distance() > 0.1)
  {
    forward();
  }
  
  // Calculate how long we drove forward for
  duration = millis() - t;
  
  // Reverse to start position
  reverse();
  delay(duration);
}

float distance()
{
  int duration;
  float dist;
  
  // Send trigger pulse
  digitalWrite(6, HIGH);
  delayMicroseconds(20);
  digitalWrite(6, LOW);
 
  // Wait for start of echo pulse
  while (digitalRead(7) == 0);
 
  duration = 0;
  while (digitalRead(7) == 1)
  {
    duration = duration + 10;
    delayMicroseconds(10);
  }
 
  dist = 0.5 * 1e-6 * duration * 340.0;
  
  return dist;
}

void motors(int lmf, int lmr, int rmf, int rmr)
{
  digitalWrite(2, lmf);
  digitalWrite(3, lmr);
  digitalWrite(4, rmf);
  digitalWrite(5, rmr);
}

void forward()
{
  motors(1, 0, 1, 0);
}

void reverse()
{
  motors(0, 1, 0, 1);
}

A partial example of a state machine:

TO BE ADDED!

Posted in Uncategorized | Leave a comment

Last Chance to record a Tip the Can time – now in KEG-036

For any teams still wishing to record a Tip the Can time, today’s class is the last chance. The Can abides!

Teams who have already recorded a green light result will presumably already have moved on to thinking about the RoboSumo final tournament, which (subject to confirmation) is expected to take place during the normal class time in week 12 – i.e. Wednesday December 5th 2018. We will discuss this is more detail during next week’s lecture.

Posted in Uncategorized | Leave a comment

Tip the Can extra session: 4-5pm, Friday 26th October in KEG-036

There will be a final opportunity to record a week 6 time in this semester’s Tip the Can competition tomorrow, Friday 26th October between 4-5pm in room KEG-036 (where Ted and Catherine normally hold their RoboSumo lab on Wednesday afternoons).

This session is not for robot development or repair – it’s just for teams who now have a working robot and want to record a time. The session is primarily aimed at teams who have not yet achieved a green light time, but have now resolved whatever technical difficulties they had on Wednesday. However, teams who have already recorded a green light time are permitted to take part if they want to try to reduce their time.

Teams who do not achieve a week 6 green light time by 5pm tomorrow (Friday) will have another opportunity to try for one next Wednesday (week 7) during the normal timetabled RoboSumo lab (3-6pm). However, please note that all week 6 green light results will rank above all week 7 green light results.

Posted in Uncategorized | Leave a comment

Tip the Can – Live results spreadsheet

Tip the Can live results spreadsheet

Posted in Uncategorized | Leave a comment