Rules

Formula Pi - The Rules and Regulations

Parties

Competitors - Anyone who has bought an entry to Formula Pi from PiBorg.
Organisers - Timothy Freeburn, Arron Churchill and Claire Pollard.

The Competition

The Formula Pi series is an autonomous robotics competition based around the Raspberry Pi. It is designed to test programming skill, teach competitors about autonomous robotics and provide a fun environment to learn and improve coding ability.

The competition is formed of 9 rounds of a combination of testing, racing and challenges along with a pair of finals to decide the top 10 positions. All racing is broadcast live on YouTube and is available for re-watching at any time.

The following webpage is for guidance to those who are entering Formula Pi. All competitors must be aware of and abide by the rules at all times.

Entry

Competitors need to purchase an Entry from the PiBorg website. Once this entry has been purchased, you will be sent a Yeti Lid to decorate and return to us. The Yeti Lid may be decorated however you like, but please keep the number space clear. Any offensive, political, religious or tasteless messages will not be used and your lid will be replaced with a sponsors lid. You will be allocated a competitor number which will be placed on your lid once you return it to us.

The Track

The PiBorg Circuit is the only circuit currently used in Formula Pi. The circuit is 22m (72 ft) long by approximately 1.83m (6ft) wide. The track is surrounded by 10mm (3/8 inch) thick rubber skirting which ranges from approximately 100mm (4 inch) at it's lowest to 150mm (6 inch) at it's highest. The track is divided into 6 lanes each approximately 305mm (12 inch) wide in a particular colour sequence. In a clockwise driving orientation, the ordering from left to right with respect to the camera view is: Red, Blue, Red, Green, Blue, Green. Normal orientation will be clockwise for the series, although there may be specialty races in the opposite direction. The robot start bays are placed on the transition between colours, allowing for a maximum of 5 robots per round.

The Robots

The robots used in Formula Pi are supplied, built and maintained by the organisers. They are standard MonsterBorg Robots available from PiBorg. The robots have been assembled with:

  • A Raspberry Pi 3B
  • A Raspberry Pi Camera V2
  • A ThunderBorg motor controller with ThunderBorg lid
  • Four 300rpm motors with giant wheels
  • Ten GP2700 AA batteries
  • A large cable tie
  • A quick release wingnut setup

In addition to the standard robots, each robot has a Yeti Lid which will be numbered, decorated by competitors and used during the season to store their code. The competitors custom code will be stored on an SD card.

Each of the robots is calibrated before they compete in Formula Pi. The calibration process is as follows:

  1. Each robot is placed on a jig, and the motors are run at set speeds. Any deviation in the tone from what is expected by the organisers will result in the motor being replaced.
  2. The organisers will place a robot on the track and also place an object 2m in front of the robot. The Raspberry Pi Camera will be focused on that object.
  3. The robot will be booted using a calibration code which takes an image of the track along with a cross hair and two slots. The top slot must be aligned with the lights and the bottom slot must be aligned with the red lap marker strip. The cross hairs must be pointing straight ahead down the middle lane of the track (between the green and the red lane) so the camera is physically aligned straight.
  4. The robot is then driven in a straight line down the longest straight to see if they deviate from the line. If it deviates within a set tolerance, the robot is mechanically altered to compensate.
  5. Each robot is then driven at a set speed and the organisers time the run with the laser timing rig. If the robot is outside of tolerance, it will be visually inspected for defects and adjusted accordingly.
  6. The robots drive around the track using a calibration code and we check that the robot performs according to the calibration code. Any deviations from what is expected will be mechanically altered to perform as expected.

Code

On joining Formula Pi you will be sent a "Getting Started" guide which will indicate where to download code, how to modify the code, how to return code to us and how to use the simulator.

Submitting code

Code must be submitted to our FTP server for every round competitors wish to take part in. Even if no changes have been made to the code in the time between rounds. Due dates and times for code will be published on the Formula Pi calendar. Times will be in UK local time (either GMT or BST depending on the time of year). If code does not reach the organisers before this deadline, competitors will not be entered for that round and will not gain any points.

If you are making big changes, or have a particularly complex code setup, we will accept custom cards from competitors which can be physically mailed to us for events. These custom cards must adhere to the same submission rules and timings as returning via our FTP.

Code Requirements

The standard code library is in Python. Competitors can either compete using Python, or if they wish write their own code in another language they can do.

The code must be able to load within the 2 minutes allocated for the Power Up Sequence during round setup. The code must also run on a MonsterBorg robot setup for Formula Pi without any additional intervention from us before, during or after the event.

Making Log Files

Competitors are able to store data and images from the camera and the Raspberry Pi for use in their preparations between Formula Pi rounds. There is an upper limit on 150MB storage per team per round. Any data beyond this limit will not be returned to the competitors.

Receiving Log Files

The organisers aim to return log files to competitors no later than 48 hours after the competition via the FTP. These log files can be used by competitors to improve their code and get an idea of how to improve for future events.

Robot Setup

Pre-round setup

Before each round a standard setup procedure takes place.

All batteries are fully charged on the day of competition. Battery voltage is checked once they've been fully charged. Any batteries which are out of a set tolerance are replaced.

Each robot is visually inspected removing any hair or debris from around the hubs from previous rounds.

The organisers also check each hub, wheel and motor for backlash (back and forth play of the motors), run out (eccentricity in movement of the wheels) and bearing play (in and out movement between the wheel, hub and motor). Any broken motors, hubs or wheels are replaced.

The submitted code will be transferred onto an SD card which will be kept with a competitors lid. This SD card will be transferred into a randomly chosen calibrated robot and the Yeti Lid will be attached using the wingnuts. A random pack of the ten checked and charged batteries will be chosen and connected to the robot. Once the robot has been assembled, it is ready to enter the race.

Power Up Sequence and Start Lights Sequence

Once the robots have been positioned on the track in their bay, the organisers will switch on each robot. Switching on of the robots is done in no particular order.

Each robot is given two minutes to boot up, during which time the LED on the ThunderBorg will turn orange (battery monitoring) and then to a designated race colour either: red, yellow, green, blue or white. This colour is randomly allocated at the start of each round by the organisers. The appearance of the designated race colour is an indication to the organisers that the robots are ready to race and to organiser Arron when the robots are upside down to indicate which competitor is which.

Once the two minutes boot time has elapsed and all robots are ready, the light sequence begins. The row of LEDs across the bridge in front of the robots will change from green to red and then back to green. The time between the light changes is determined by the organisers, and will not be the same for all heats.

Once the second green light appears robots can leave the line and begin racing. After all five robots are moving, the organisers will aim to turn the lights off.

Power Up Sequence Issues

If the ThunderBorg LED does not change colour, the robot in question will be switched off, restarted and a second 2 minute boot time will be given whilst all other competitors wait on the start line. After this second 2 minute boot, the start sequence is continued.

If a robot does not leave the start line after the lights have changed, the lights will be changed again to ensure the robot saw the lights. Any robot who stays on the line and does not start will be left on the track for the duration of the race.

If all robots halt during a race, the organisers may abandon the race giving the results as they stand.

Post Round Checks

If the organisers think the robots mechanical behaviour is suspicious in any way, we will inspect the robot and check the robot with house code. If any faults are found we will rectify them.

If faults are found, it will be deemed a "mechanical fault" and the competitor effected by this problem will get a re-run.

Round Formats

There are 3 main round types and the finals. Each event has a different set of rules which competitors need to be aware of before taking part. Each Formula Pi Round consists of multiple Heats depending on the number of entrants.

Testing Rounds

Testing rounds are designed for solo runs to test code and new ideas.

Each testing heat will consist of a single robot starting in the central lane between the neighbouring red and green lanes. The competitor is given 2 minutes to boot their code before the start lights will be triggered. Once the lights have triggered the competitor will have 2 minutes to complete as many laps as possible. Lap times will be fed back to the competitors via the live stream on YouTube. Once the 2 minutes has elapsed the robot will be switched off and removed from the track.

Once all competitors have completed testing, log files from the robots will be returned to competitors. The organisers aim to do this within 48 hours of the completion of testing.

Testing is purely for validation and testing purposes, no series points can be gained from testing and it is not required that all competitors take part in testing. However to take part in testing, code must be received by the organisers in accordance with the code deadlines provided in the official dates.

Challenge Rounds

Challenge rounds are designed to test competitors avoidance code in a head to head dodge the robot race.

Before each challenge round, 5 stationary MonsterBorgs will be placed around the track in locations chosen by the organisers. These locations will not be revealed to the competitors in advance. These locations will be marked with a small piece of black electrical tape.

Each heat will consist of a pair of competitors who will be randomly assigned either the +1 (Blue | Red) lane or the -1 (Green | Blue) lane. Both competitors are given 2 minutes to boot their code before the start light sequence will be triggered. Once the start lights have triggered, each competitor has 3 minutes to avoid the robots placed around the track and achieve as many laps as possible. The winner will be the robot who has achieved the most laps in the allotted time.

Series points for challenges will be awarded as follows:
2 points for each full lap completed (in the forwards direction)
2 additional points for the robot who comes first (ie. completes the most laps).

At least one lap must be completed for points to be gained, and only whole laps count.

In the event of a tie, the robot which crossed the line for the current lap first will be awarded the win.

At the end of each heat, the stationary MonsterBorgs will be placed back into their starting locations by the organisers to ensure each pair of competitors has a consistent race experience.

Race Rounds

Race rounds are designed to test competitors against a large pack of moving robots.

Each race will consist of a heat containing 5 robots randomly assigned one of the 5 start bays. The competitors will be given 2 minutes to boot their code before the start lights sequence will be triggered. Once the start lights have triggered, each competitor has 10 minutes to complete as many laps as possible.

Series points for races will be awarded as follows:

  • 10 points for first place
  • 8 points for second place
  • 6 points for third place
  • 4 points for forth place
  • 2 points for fifth place.

At least five laps must be completed for points to be gained, and only whole forward laps count. If laps are completed in the reverse direction, they will be taken off the lap total as it stands.

In the event of a tie, the robot who completed the winning lap first will be awarded the win.

Finals

The top 10 robots in the leaderboard at the end of the series will be invited to take part in the finals. There are two finals:

  • A-Final to determine positions 1-5. This will consist of the robots in positions 1-5 on the leaderboard after 9 rounds.
  • B-Final to determine positions 6-10. This will consist of the robots in positions 6-10 on the leaderboard after 9 rounds.

Race rules apply during the final.

Negative Laps during Challenge, Race and Final Rounds

Laps performed in the reverse direction will be subtracted from the running lap total.

For example, if a competitor has 10 laps, they then turn around and drive in the reverse direction around the track and cross the start/finish line their lap count is reduced to 9. They must turn around and drive back over the start/finish line to increment their count back up to 10.

Leaderboard

At the end of each round the scores will be updated on the leaderboard. In the event of a tie on points on the leaderboard, number of laps completed will be taken into account to determine ordering. If there is still a tie, the lap average from challenge and race rounds will be used.

Jump Starts

Competitors might jump start the lights during challenges and racing.

In the event of a competitor jump starting the lights in a challenge round or race round, the competitor's robot which jumped the lights will be turned off and replaced on the start line in their allocated lane. If multiple robots jump the start sequence, each robot which jumped the lights will be turned off and replaced on the start line. Any robot which jump started will not take part in the race and will score 0 points. Then the usual race start sequence will be continued for the remaining robots, the robots will not be power cycled at this time.

If other competitors are visibly effected by the jump start, for example other robots leave the line after being hit, the race will be abandoned and the heat will be re-run at a later date. The robot(s) who originally jump started will remain powered down for the re-run.

Jump starts during testing rounds the robot will be allowed to continue, however competitors will be advised that their code is jump starting and needs to be altered before the next round.

Mechanical Failures

In the event of a mechanical issue with one of the robots during an event, the robot will be examined by the organisers after the heat. If a problem is found, the competitor will be added into another heat in a different functioning robot. If there are no heats left, a separate heat will be run with house robots under the standard event rules, recorded and uploaded to YouTube after the event.

This is the case in the 9 testing, challenge and race events. In the Finals, any mechanical issues will not be subject to a re-run.

The following will not be considered mechanical issues:

  • Battery disconnects after contact with a wall or other robots
  • Robots hitting other robots power switches
  • Robots being pushed into the infield gravel
  • Robots being beached on the barrier
  • Robots ended up on their sides
  • Robots being stuck on other robots
  • Loss of a wheel which does not affect a robots progress adversely

Determining a mechanical failure is at the organiser's discretion.

Winning Team's Code

The Team which wins Formula Pi will have their code shared with competitors present and future to improve the next season of Formula Pi. This code will be pushed to the Formula Pi Source Forge repository.

Live Broadcast

All Formula Pi Rounds will be broadcast live on YouTube. There will be live commentary where possible.

Event Scheduling

Events may be postponed due to circumstances out of our control. This could include (but is not limited to):

  • Power outages
  • Internet issues
  • Sickness of organisers
  • Track damage
  • Robot damage

Results

Results will be published within 48 hours of each event happening. This gives organisers chance to compile results, perform reruns, re-enact close runs or discuss potential issues with racing.

In the event of re-runs due to mechanical failures, results may be delayed further than the 48 hours outline above.

Prizes

Prizes will be given to the 1st, 2nd and 3rd place competitors from the competition. These will be:

1st place: A MonsterBorg kit and a laser cut trophy complete with Raspberry Pi base unit.
2nd place: A Diablo motor controller and a laser cut trophy complete with Raspberry Pi base unit
3rd place: A ThunderBorg motor controller and a laser cut trophy complete with Raspberry Pi base unit.

Additional prizes may be added from sponsors if available. Prizes are subject to availability and are subject to change at the organisers discretion.

Anti Cheating Rules

Formula Pi wants to promote ingenuity and alternative approaches to racing. However these must be in the spirit of competition.

Any strategy deemed to be cheating from the view of the organisers may result in expulsion from the competition without any compensation or reward. Cheating could be (and is not limited to):

  • Inhibiting the progress of other vehicles beyond normal rubbing and glancing blows.
  • Turning the robot and driving directly at another robot on purpose.
  • Intentionally stopping on the track to restrict another vehicle from making progress.
  • Using the LED in the ThunderBorg for something other than displaying the assigned race colour (such as dazzling).
  • Purposefully damaging a robot so as to hinder the next set of racers who will use that robot.
  • Obscuring code via complex coding practices or extreme lack of commenting to disguise nefarious code from the organisers.

Determining cheating is at the organiser's discretion.

Community Guidelines

The Formula Pi Competition is designed to be fun, supportive and positive for both organisers and competitors alike. We actively encourage our competitors to support each other, be kind and provide help and constructive/positive criticism as much as possible. This applies to our organisers too. Suggestions for improving Formula Pi are welcome and should be directed through the Forums, Email and Discord where possible.

The organisers will not tolerate behaviour which is deemed to be:

  • Abuse or harassment directed towards an individual or organiser within the Formula Pi community.
  • Abuse or harassment directed at of any groups within or outside of Formula Pi, such as religious groups, sexual orientation, gender, political affiliation or other such groups.
  • Misuse of the property of used in Formula Pi including robots, track, cameras, broadcast equipment, code repositories and FTP.
  • Sharing inappropriate content or illegal material across any of the properties used by the Formula Pi Organisers or Competitors.
  • Spamming or excessive use of communications channels such as Email, website, Forums, Social Media, Discord, YouTube chats, Surveys or any other means of communication used by the Formula Pi Community and its Organisers.

Any behaviour or misconduct which breaks these rules will result in:

  1. A formal warning in the first instance.
  2. Immediate removal from the Formula Pi competition and a deduction of all points for a single further offence or in the case of an extreme breach of the above rules immediate removal from the Formula Pi competition and a deduction of all points. No entry fee refunds will be given.

Discord Server

The Formula Pi organisers host a Discord Server for fans and racers alike to chat, swap ideas, and talk about the latest Formula Pi developments. As well as following the community guidelines outlined above, all users must abide by the Discord Guidelines at all times. Any misconduct or breach of those rules or the community guidelines outlined above will result in:

  1. A formal warning in the first instance.
  2. Immediate removal from the Formula Pi competition and a deduction of all points for a single further offence or in the case of an extreme breach of those Guidelines and immediate removal from the Formula Pi competition and a deduction of all points. No entry fee refunds will be given.

Access to the Discord server is run on an invitation only basis. The organisers reserve the right to remove people from the server who behave against the spirit of what the Formula Pi community stand for. Code sharing may only take place within Parc Ferme. It is a violation of the Formula Pi Licence to share Formula Pi code in public.

Disclaimer

Hours spent competing, coding and preparing for Formula Pi will not be subject to any monetary remuneration. By competing in Formula Pi competitors are bound by these rules. Organisers reserve the right to suspend or remove competitors who break these rules without any refund of fees or additional monies for time and effort spent on the competition.

Organisers will listen to concerns or complaints about the competition, but reserve the right to decline any suggestions. Organisers decisions are final.

All of the above rules are subject to change and racing is permitted at the discretion of the organisers of Formula Pi.