lukicdarkoo / webots-competition-organizer

Home Page:https://lukicdarkoo.github.io/webots-competition-organizer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webots-competition-organizer

Webots Badge

Organize

Make repositories

First, you need to make a repository like this by clicking on the green button Use this template. You also need to do the same for the competitor repository so the competitors can fork it and push their controllers.

Personal Access Token

PAT (Personal Access Token) is necessary to be able to pull a code from a participant's private repositories.

  • Generate a new token here
    • If this repository is hosted at a GitHub organization you will need to create a new GitHub account and generate the token for it.
  • Create a new secret, name it BOT_PAT_KEY and paste the key you have just generated.
  • Create a new secret again, name it BOT_USERNAME and put your username in it.
    • If this repository is hosted at a GitHub organization use your bot's username.
  • Let the participants know they have to add your username to Settings > Manage access so you have the right to clone their private repositories.

Customize

The sample competition is just a sample and you probably want implement a custom scenario and rules.

  • Change the scenario in the world file (worlds/ratslife_round.wbt).
  • Change the contest manager controller:
    • The purpose of this supervisor controller is to keep a track of the competitors and their points, something like a referee.
    • You should write the competition results to /tmp/results.txt, so the results can be parsed by CI.
      # Format of `/tmp/results.txt`:
      #   winner: [index of winner]
      #   points: [points of the first robot], [points of the second robot]
      winner: 0
      points: 111, 0
    • Once the match is over, you should use the Emitter node to send done on channel 1024 so our animation recorder is aware the match is done.

Publish the results

The Webots GitHub action generates a preview of the competition and publishes it to the gh-pages branch. Therefore, you have to choose the gh-pages branch as the publishing source. Then, you can access the preview at [your_username].github.io/[your_repo_name].

About

https://lukicdarkoo.github.io/webots-competition-organizer/


Languages

Language:C 93.6%Language:Python 4.3%Language:Makefile 2.1%