Judge library used for evaluating the first phase in the Machathon 4.0 competition
Project description
Machathon4.0-Judge
The Machathon4.0 Judge repository provides all the required tools and utilities for the Machathon4.0 Competition - self driving cars edition. It features convenient wrapper functions for controlling the movement of the car and capturing images from the camera within the CoppeliaSim simulator. It also includes the judge code that evaluates the competitor's solution and updates the leader-board.
This project can be found in the following repository.
For more information about the competition regulations, please refer to the Official Competition Rules Book.
Installation
-
Clone the repositry
git clone https://github.com/NouranHany/Machathon4.0-Judge.git
-
Navigate to the repository directory
cd Machathon4.0-Judge
-
Install all dependencies needed
pip install -r requirements.txt
Preparation for running the code
Before running your code, it's important to make sure you have opened the filteration_scene.ttt
in CoppeliaSim. Here are the steps to follow:
- Open CoppeliaSim.
- Load the
filteration_scene.ttt
file by going to File > Open Scene > Browse, then navigating to the location where the scene file is stored.
How to Use the Judge?
- Create an instance of the Judge class and provide your team information, including the team name, team code, and the path to a zip containing your code.
judge = Judge(team_name="TeamX", team_code="9digit_team_code", code_file_paths=['your_solution.zip'])
- Pass the function where you have written your main solution to the judge. For example, if your solution is in a function named run_car, use the following code:
judge.set_run_hook(run_car)
- Call the judge to run your code. The judge will call your code twice and calculate the lap time for each run. If you choose to publish the lap time to the leaderboard, set the
send_score
parameter toTrue
.
judge.run(send_score=True)
The provided test.py
file demonstrates how to use the Judge class. Note: don't submit your solution using this script as it uses the keyboard to manually control the car which is against the rules.
Note for Ubuntu users
The test.py script uses the keyboard library which requires running "sudo", so replace "pip3" with "sudo pip3" and "python3" with "sudo python3". This is only needed for the test.py
Project Hierarchy
└── Machathon4.0-Judge/
├── machathon_judge/
│ ├── data.py # contains important variables that are used throughout the project
│ ├── judge.py # Module containing the Judge class to run the competition's tracks and publish the scores to the leaderboard
| ├── collision_manager.py # Module containing the CollisionManager class to manage the collision events
│ ├── simulator.py # Wrapper for the API that connects CoppeliaSim and Python
│ └── filteration_scene.ttt # The competition environment in CoppeliaSim, which includes the track and the vehicle
├── test.py # Demonstrates how to utilize the competition judge and simulator classes
└── requirements.txt
Attribution
This code was developed and maintained by Step Towards Progress STP, a non-profit organization focuses on developing youth in various fields personally and technically through academic programs, projects, and events. You can find more information about STP at https://stp-org.com/
If you have any questions or would like to get in touch with our team, please email us at stp23.official@gmail.com or find us on Facebook.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file machathon_judge-1.0.0.tar.gz
.
File metadata
- Download URL: machathon_judge-1.0.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c38e7f61c9026145612a6d126145aa52f8bb4466568048d602caf127a9ac3e7 |
|
MD5 | d0690020e680b5f02447d8248c7afaf3 |
|
BLAKE2b-256 | 3f7a7cd8e718168cd1d914f03cfe77168134ecdc53064b2997e6f1893fbf770f |
File details
Details for the file machathon_judge-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: machathon_judge-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45eace5458e208551f4d6969e8c02742a7099482a8817e2737d09a4182b01435 |
|
MD5 | d5fc81837a5c5fbcc0af4f0d23c69c3d |
|
BLAKE2b-256 | 39ff81dfc03ef4911b6c138d5e2d4c2d8d84597ea902daf77cd3a802e0b1be00 |