Git Product home page Git Product logo

machathon4.0-judge's Introduction

Machathon4.0-Judge

Website Website Website

Machathon header

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.

๐Ÿ† Official Compeititon Leaderboard

๐Ÿ“œ For more information about the competition regulations, please refer to the Official Competition Rules Book.

Installation

You can install the machathon judge library using pip through the following command:

pip install machathon-judge

Or you can install it manually using the following steps:

  1. Clone the repositry
    git clone https://github.com/NouranHany/Machathon4.0-Judge.git

  2. Navigate to the repository directory
    cd Machathon4.0-Judge

  3. 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:

  1. Open CoppeliaSim.
  2. 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?

  1. Create an instance of the Judge class and provide your team information, including the team code(consists of 9 digits), and the path to a zip containing your code.
judge = Judge(team_code="your_new_team_code", zip_file_path="your_solution.zip")
  1. 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)
  1. 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 to True.
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

STP logo

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 [email protected] or find us on Facebook.

machathon4.0-judge's People

Contributors

kareemalsawah avatar nouranhany avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.