All Projects → RedHat-Israel → ROSE

RedHat-Israel / ROSE

Licence: GPL-2.0 license
ROSE project car race game

Programming Languages

python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to ROSE

aioScrapy
基于asyncio与aiohttp的异步协程爬虫框架 欢迎Star
Stars: ✭ 34 (+41.67%)
Mutual labels:  twisted
highway-path-planning
My path-planning pipeline to navigate a car safely around a virtual highway with other traffic.
Stars: ✭ 39 (+62.5%)
Mutual labels:  self-driving-car
pydata-berlin-2017
Finding Lane Lines for Self Driving Cars
Stars: ✭ 40 (+66.67%)
Mutual labels:  self-driving-car
prometheus-async
Async helpers for prometheus_client.
Stars: ✭ 136 (+466.67%)
Mutual labels:  twisted
Light-Condition-Style-Transfer
Lane Detection in Low-light Conditions Using an Efficient Data Enhancement : Light Conditions Style Transfer (IV 2020)
Stars: ✭ 133 (+454.17%)
Mutual labels:  self-driving-car
self-driving-car
Implementation of the paper "End to End Learning for Self-Driving Cars"
Stars: ✭ 54 (+125%)
Mutual labels:  self-driving-car
Traffic-Sign-CNN
Deep learning network for traffic sign image classification
Stars: ✭ 15 (-37.5%)
Mutual labels:  self-driving-car
24-game
24 point game implemented in Python, just for fun!
Stars: ✭ 16 (-33.33%)
Mutual labels:  twisted
CAP augmentation
Cut and paste augmentation for object detection and instance segmentation
Stars: ✭ 93 (+287.5%)
Mutual labels:  self-driving-car
Articles-Bookmarked
No description or website provided.
Stars: ✭ 30 (+25%)
Mutual labels:  self-driving-car
Melkweg
Project Melkweg is only a tool testing the network latency between two computers.
Stars: ✭ 18 (-25%)
Mutual labels:  twisted
Cardinal
A Python IRC bot, designed to make adding functionality quick and simple.
Stars: ✭ 92 (+283.33%)
Mutual labels:  twisted
mpc
A software pipeline using the Model Predictive Control method to drive a car around a virtual track.
Stars: ✭ 119 (+395.83%)
Mutual labels:  self-driving-car
Model-Predictive-Control
Udacity Self-Driving Car Engineer Nanodegree. Project: Model Predictive Control
Stars: ✭ 50 (+108.33%)
Mutual labels:  self-driving-car
tubes
A series of tubes.
Stars: ✭ 55 (+129.17%)
Mutual labels:  twisted
Visualizing-lidar-data
Visualizing lidar data using Uber Autonomous Visualization System (AVS) and Jupyter Notebook Application
Stars: ✭ 75 (+212.5%)
Mutual labels:  self-driving-car
SelfDrivingRCCar
Autonomous RC Car using Neural Networks, Python and Open CV
Stars: ✭ 102 (+325%)
Mutual labels:  self-driving-car
SnitchDNS
Database Driven DNS Server with a Web UI
Stars: ✭ 169 (+604.17%)
Mutual labels:  twisted
end-to-end-deep-learning
Autonomous driving simulation in the Unity engine.
Stars: ✭ 27 (+12.5%)
Mutual labels:  self-driving-car
slackbridge
Bridge between IRC and Slack running on Kubernetes
Stars: ✭ 12 (-50%)
Mutual labels:  twisted

ROSE Project

CI WorkFlow

This project is a game that has been developed to assist in teaching kids python. The students need to code the behavior of a car to achieve the best score.

Here is a video of a race (running code from students): (Click on the screenshot to play the video)

ROSE Race Car Game

In this game, two race cars compete to achieve the most points. The race car must recognize the race track, the obstacles, and the bonus areas; then calculate the best path where the pitfalls are avoided and all the bonus points are collected. The cars move autonomously on the screen within the race track game with no interference from the students. No joystick or mouse shall be used.

In order to control the car movements, the students needs to implement a 'driver'. This code controls the car and will decide what the next action of the car will be.

For each type of obstacles there is a different action and different points assigned.

See examples/README.md for an explanation on how to write a driver module.

GitHub pages

Refer to our GitHub pages for the course materials and additional resources: https://redhat-israel.github.io/ROSE/

Talks and presentations

Requirements

Once we're in the ROSE directory, we need to verify we have pipenv installed. In order to make sure we have pipenv installed:

pipenv --version

If you don't have it installed, the best way is to install it only for your user:

python -m pip install --user pipenv

Getting started

The following commands should be performed only once; after creating the environment you will be connecting to the same environment each time you open a new session.

Use pipenv to create a virtual environment and to install the rest of the dependencies:

pipenv install

You can also install development packages by running:

pipenv --dev install

After creating the environment, we want to activate and enter our environment (make sure you're in the ROSE directory):

pipenv shell

Indication that you are inside the environment, the prompt line will look like this:

(ROSE) [username@hostname ROSE]$

Running the server

If you are not in your virtual environment, please run it:

pipenv shell

Start the server on some machine:

./rose-server

For running the same track for all drivers (instead or random) start the server using:

./rose-server -t same

Open a browser at http://{server-address}:8880 to view and control the game.

Running the server in Podman

Build the Docker image:

podman build -t rose_server .

Run the Docker image on port 8880:

podman run -it --rm --name=rose_server -p 8880:8880 rose_server python ./rose-server

If you don't want to see the log of the run in the current window, replace -it with -d.

Open a browser at http://{server-address}:8880 to view and control the game.

Tunneling the UI server to your browser

You can use SSH tunneling when running the server on your remote VM, so you can view the game in you local browser:

ssh -L 8880:127.0.0.1:8880 {user}@{server-address}

After starting the server (as mentioned above), open a browser at http://127.0.0.1:8880/ to view and control the game.

Opening firewall ports

You can also open ports 8880 and 8888 on the remote VM running the server, and browse from a local machine in case port 8880 or 8888 are blocked by firewalld:

sudo firewall-cmd --add-port=8880/tcp --permanent
sudo firewall-cmd --add-port=8888/tcp --permanent
sudo firewall-cmd --reload

Running a driver

In a new window, open your virtual environment:

pipenv shell

Create your driver file:

cp examples/none.py mydriver.py

Edit the file mydriver.py and change the driver_name variable to your name.

Start up the client, using your driver file:

./rose-client mydriver.py

The server address can be specified that way (Replace '10.20.30.44' with your server address):

./rose-client -s 10.20.30.44 mydriver.py

For running the driver on the Docker container use:

docker exec -it rose_server python ./rose-client examples/random-driver.py

For driver modules, see the examples directory.

You can run the game with just 1 driver!

To let 2 drivers compete, repeat these commands in 2 terminals.

Command line interface

You can control the game from the command line using the rose-admin tool.

To start a race, use the rose-admin tool on any machine:

./rose-admin {server-address} start

To stop a race, use the rose-admin tool on any machine:

./rose-admin {server-address} stop

To modify the game rate, you can use the "set-rate" command. The following command would change game rate to 10 frames per second:

./rose-admin {server-address} set-rate 10

Using tmux / screen

./rose-server and ./rose-client {driver name} do not return, but continue running, in order to run both server and drivers a user need to run them in separate shells, Each driver will run it it's own pipenv shell. tmux may be useful in this case.

Example tmux commands:

Command Description
Ctrl+c Create a new window
Ctrl+n Toggle to next window
Ctrl+w List open windows

Creating a tarball

python setup.py sdist

Developing

Should you want to contribute to the project, please read the Code of Conduct.

To install development requirements:

pipenv install --dev

To open a shell for development, use:

pipenv shell

For development in docker, use:

docker build --build-arg DEV=True -t rose_dev .

Before submitting patches, please run the tests:

flake8
pytest

Creating coverage report in html format:

pytest --cov-report html
xdg-open htmlcov/index.html
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].