chore: add README
This commit is contained in:
61
README.md
61
README.md
@@ -0,0 +1,61 @@
|
||||
<p align="center">
|
||||
<img src="logo.svg"
|
||||
width="300"
|
||||
style="filter: drop-shadow(0 0 6px #888)">
|
||||
</p>
|
||||
|
||||
# Rally Racer
|
||||
|
||||
This repository holds a sandbox driving simulation controllable via a network interface as a machine learning and data collection challenge.
|
||||
|
||||
# Installation
|
||||
From the root of the repository, run
|
||||
```sh
|
||||
uv sync
|
||||
```
|
||||
|
||||
To run the game, you can use
|
||||
```sh
|
||||
uv run main.py
|
||||
```
|
||||
|
||||
# Generality
|
||||
Launching [`main.py`](main.py) starts a race with a single car on the provided track.
|
||||
This track can be controlled either by keyboard (*WASD*) or by a socket interface.
|
||||
An example of such interface is included in the code in [*`scripts/recorder.py`*](scripts/recorder.py). To run it, simply use the following command:
|
||||
```sh
|
||||
uv run -m scripts.recorder
|
||||
```
|
||||
|
||||
# Sensing
|
||||
The car sensing is available in two commodities: **raycasts** and **images**. These sensing snapshots are sent at 10 Hertz (i.e. 10 times a second). Due to this fact, correct reception of snapshot messages has to be done regularly.
|
||||
|
||||
# Communication protocol
|
||||
|
||||
A remote controller can be impemented using TCP socket connecting on localhost on port 5000.
|
||||
Different commands can be issued to the race simulation to control the car.
|
||||
|
||||
These commands are declared in [`src/command.py`](src/command.py)
|
||||
|
||||
## Car controls
|
||||
```python
|
||||
ControlCommand(control: CarControl, active: bool)
|
||||
```
|
||||
To simulate key press and control the car.
|
||||
|
||||
|
||||
# Controls
|
||||
|
||||
- <kbd>W</kbd> Move forward
|
||||
- <kbd>S</kbd> Brake / move backward
|
||||
- <kbd>A</kbd> Turn left
|
||||
- <kbd>D</kbd> Turn right
|
||||
- <kbd>F</kbd> Toggle FPS indicator
|
||||
- <kbd>V</kbd> Toggle speedometer
|
||||
- <kbd>R</kbd> Reset car
|
||||
- <kbd>C</kbd> Toggle raycasts visibility
|
||||
- <kbd>Esc</kbd> Quit
|
||||
|
||||
|
||||
# Credits
|
||||
This project is based on the repository [https://github.com/ISC-HEI/RallyRobotPilot_2025](https://github.com/ISC-HEI/RallyRobotPilot_2025), which is in turn based on [https://github.com/mandaw2014/Rally](https://github.com/mandaw2014/Rally)
|
||||
Reference in New Issue
Block a user