Welcome to USRC's DRC simulator! Here, you can:
- Practice your Python coding skills
- Learn Computer Vision
- Create a self-driving car.
If you're a developer looking to improve this repository, please look at developers.md
in this same directory.
To get started with the simulator, you need to do some things:
- Have
python
(python 3, to be precise) installed. For installation instructions, go to Python's download site. - Install all the dependencies below:
pip3 install opencv-python
pip3 install websockets
- Copy our repository to a safe place, using
git clone https://github.com/usydroboticsclub/DRCSimulator.git
. - That's it! You're ready to go.
- Open a terminal at the directory and type in
python3 simulatorServer.py
. - In a web browser, go to
http://localhost:8000/index.html
. You should see a car on the top panel of the screen, and a picture showing what the car sees on the bottom panel. - In a separate terminal, run
python3 sampleCar.py
. You should see the following things happen:- The car in your browser window starts moving in a circle.
- A window pops up, showing the car's point of view.
- Copy
sampleCar.py
into a safe place. - Open
sampleCar (copy).py
inVisual Studio Codeyour preferred IDE / text editor. - Read, edit, run when ready. And show us what you can do! Send videos, emails and code to [email protected].
- You can find USYD's successful 2019 entry here: https://github.com/clucini/SelfZoomingCar. It's not particularly well documented, but there may be some lessons to be learnt in terms of modular architecture. (May.)
- You can also try to drive the car yourself using the WSAD keys at
http://localhost:8000/index_keydrive.html
- If the code is running way too slowly, you can try Josiah Tan's Processing version here: https://github.com/Josiah-tan/DRCsimulator_test
If you would like to claim PEP hours for this activity, please email us with some proof of work (a link to your repository or a video); and we'll be happy to back up your PEP claim and perhaps get it fast-tracked.
This simulator is not designed to be competition-grade. You can mess around with the parameters a lot; you can make the car very very fast or make it fly by editing the source code as you want. So, um, enjoy? Just don't push it to prod.
Have fun!