- Setup Utama
- Repository Guide
- Setup grSim
- Setup AutoReferee
- Setup SSL Vision for Real Testing
- Field Guide
- System Design
- Milestones
- Install
pixipackage manager withcurl -fsSL https://pixi.sh/install.sh | shor click here for Windows installation Pixi installation - Restart or create a new terminal
- With pixi: just run
pixi installin the base folder and you're all setup. - Note that this also installs all modules with
__init__.py(so you need to run it again when you add an__init__.py) - In order to go into the
pixivenv, runpixi shell. You can also run any of the tasks in thepixi.tomlwithout first being in a pixi shell. See Pixi Tasks. - Finally, run
pixi run precommit-install. This will ensure that linting is done before you commit.
Note
- if you are using the run button and it is selecting the wrong env (robosim) you will need to manually change the interpreter in VS Code using
Ctrl + Shift + P->Select Interpreter. - if you want to perform a one-off run (ad-hoc) use
pixi run python -m path.to.your_file, where you replace the/with.and remove the trailing.py.
pixi run <task_name> is the generic way to run a task. Some of the main tasks you can run:
pixi run mainruns main.pypixi run precommit-installdownloads the precommit hook to ensure that your code is formatted correctly when you commit and push.pixi run lintruns the full suite of precommit checkers on all files (You need to run the precommit install task above first).pixi run testruns pytest over theutama_core/tests/folderpixi run replay [-n <file_name>] [-p]runs the replay file stored in the./replaysfolder.- Use
-n/--replay-fileto specify a file name; if not provided, defaults to the latest replay in the folder. - Use
-p/--play-by-playfor step-by-step playback.
- Use
strategy: higher level control from above roles to plays and tactics in decision-tree like abstractionskills: lowest level of control for individual robotsmotion_planning: control algorithms for movement and path planningteam_controller: interfacing with vision (including processing) and robotsrun: The logic for main running loop, including refiners and predictorsglobal_utils: store utility functions that can be shared across all foldersentities: store classes for building field, robot, data entities etc.rsoccer_simulator: Lightweight rSoccer simulator for testingreplay: replay system for storing played games in a .pkl file that can be reconstructed in rsoccer simtests: include all unit tests hereconfig: configs for the robots (defaults, settings, roles/tactics enums, etc.)
-
Use typing for all variables.
-
Document your code on the subfolder's
README.mdand wiki. -
Download and install
Black Formatterfor code formatting- For VScode, go to View > Command Palette and search
Open User Settings (JSON) - Find the
"[python]"field and add the following lines:
"[python]": { "editor.defaultFormatter": "ms-python.black-formatter", # add this "editor.formatOnSave": true, # and add this }
- For VScode, go to View > Command Palette and search
- Each feature should live within its own branch of the repository. Clear out stale branches.
- Ensure that you have run
pixi run precommit-installat least once. This ensures that the pre-commit steps are run on each commit to clean up your code. - If the precommit fails, click on
Open Git Logon the popup window to view the error. Often times, the failure is automatically fixed and you just need to commit the changes the precommit hook makes. - The popup window can often be quite cryptic when it fails. If you are getting a
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)popup on commit, this is not the actual cause of the failure. However, Windows decides to show this warning, because it is first warning in the output. To silence this:
sudo apt-get update
sudo apt-get install -y locales
sudo locale-gen en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8
source ~/.bashrcFor a PR to be accepted, it must:
- have a
releasetag assigned, eitherrelease:major,release:minor, orrelease:patch. - Pass all CI checks, both tests and linting.
- Not be branched from a stale version of main. Remember to update the PR:
git checkout main
git checkout <your_branch>
git merge main- have all Copilot comments reviewed (Not all must be addressed: Copilot makes mistakes too, so don't blindly accept!)
- have at least one tick from an assigned reviewer
- Go to grSim repo and follow the installation steps.
- Change the values in the configuration to what is highlighted below:
- To run, execute
./bin/grSimin the cloned repo.
- Make sure
grSimis setup properly and can be called through terminal. git clonefrom AutoReferee repo in a folder named/AutoRefereein root directory.- Change
DIV_Ain/AutoReferee/config/moduli/moduli.xmltoDIV_B.
<globalConfiguration>
<environment>ROBOCUP</environment>
<geometry>DIV_B</geometry>
</globalConfiguration>- Get the latest compiled game controller and rename it to
ssl_game_controller. Save it in/ssl-game-controllerdirectory.
- Connect to an external hotspot and ensure both the vision Linux laptop and your personal laptop are connected to the same network.
- Allow inbound UDP packets through the port you set. Run the following command with admin privileges:
New-NetFirewallRule -DisplayName "Allow Multicast UDP 10006" -Direction Inbound -Protocol UDP -LocalPort 10006 -Action Allow
- Type "%USERPROFILE%" into "Windows + R", then add a
.wslconfigfile. Ensure that the file type is set to WSLCONFIG.
[wsl2] networkingMode=mirrored
- Restart WSL using
wsl --shutdown, then check the connection using the following command:
sudo tcpdump -i eth1 -n host 224.5.23.2 and udp port 10006
If you see UDP packets, everything is working.
- All coordinates and velocities will be in meters or meters per second.
- All angular properties will be in radians or radians per second, normalised between [pi, -pi]. A heading of radian 0 indicates a robot facing towards the positive x-axis (ie left to right).
- Unless otherwise stated, the coordinate system is aligned such that blue robots are on the left and yellow are on the right.
- The center of the field is marked as (0, 0).
The system design diagram is attached here for reference. For more information on the design, see here.
- 2024 November 20 - First goal in grSim (featuring Ray casting)


