<commit_before># RacingRobot
Autonomous toy racing car. CAMaleon team at the Toulouse Robot Race 2017.

![The racing robot](https://cdn-images-1.medium.com/max/2000/1*UsmiJ4IzXi6U9svKjB22zw.jpeg)

## Detailed presentation

We wrote an article on medium that detailed our approach. You can read it [here](https://medium.com/@araffin/autonomous-racing-robot-with-an-arduino-a-raspberry-pi-and-a-pi-camera-3e72819e1e63)

## 3D models and training data

### 3D models

3D models (we used onshape.com):
- [Battery Holder](https://cad.onshape.com/documents/a94876919eca38f49abb5ed6/w/b7e86a4005e4b951f0e3d31a/e/5d33c78dde85b96e033f5c9b)
- [Camera Holder](https://cad.onshape.com/documents/dfd040c2f0a4f5410fdcb118/w/d7cc8bc352d92670e7416569/e/0f263a0dde0b04a2688fd3c9)
- [Additional Camera Piece](https://cad.onshape.com/documents/1c4a51d839f2a5989e78ef1f/w/1af5b4b508310461911ecd97/e/a35856fc588eb371f0bac58b)
- [Raspberry Pi Holder](https://cad.onshape.com/documents/621b6943711d60790ddc2b9f/w/c29ba5f453ce625afc8128f6/e/1aa39940e0bdabd3303d76c4)

### Training data

The training data can be downloaded [here](https://www.dropbox.com/s/24x9b6kob5c5847/training_data.zip?dl=0)

There are two folders:
- input_images/ (raw images from remote control)
- label_regions/ (labeled regions of the input images)

The name of the labeled images is as follow: *"x_center"-"y_center"\_"id".jpg*

For example:
- `0-28_452-453r0.jpg`
=> center = (0, 28)
=> id = "452-453r0"

- `6-22_691-23sept1506162644_2073r2.jpg`
=> center = (6, 22)
=> id = "691-23sept1506162644_2073r2"

## How to run everything ?

For installation, see section *Installation*.

## Autonomous mode

Main script, it will try to follow a black&white line.
```
python main.py
```

## Remote Control Mode

0. You need a computer in addition to the raspberry pi<commit_msg>Update title<commit_after># Autonomous Racing Robot With an Arduino, a Raspberry Pi and a Pi Camera
Autonomous toy racing car. CAMaleon team at the Toulouse Robot Race 2017.

![The racing robot](https://cdn-images-1.medium.com/max/2000/1*UsmiJ4IzXi6U9svKjB22zw.jpeg)

## Detailed Presentation

We wrote an article on medium that detailed our approach. You can read it [here](https://medium.com/@araffin/autonomous-racing-robot-with-an-arduino-a-raspberry-pi-and-a-pi-camera-3e72819e1e63)

## 3D Models and Training Data

### 3D Models

3D models (we used onshape.com):
- [Battery Holder](https://cad.onshape.com/documents/a94876919eca38f49abb5ed6/w/b7e86a4005e4b951f0e3d31a/e/5d33c78dde85b96e033f5c9b)
- [Camera Holder](https://cad.onshape.com/documents/dfd040c2f0a4f5410fdcb118/w/d7cc8bc352d92670e7416569/e/0f263a0dde0b04a2688fd3c9)
- [Additional Camera Piece](https://cad.onshape.com/documents/1c4a51d839f2a5989e78ef1f/w/1af5b4b508310461911ecd97/e/a35856fc588eb371f0bac58b)
- [Raspberry Pi Holder](https://cad.onshape.com/documents/621b6943711d60790ddc2b9f/w/c29ba5f453ce625afc8128f6/e/1aa39940e0bdabd3303d76c4)

### Training Data

The training data can be downloaded [here](https://www.dropbox.com/s/24x9b6kob5c5847/training_data.zip?dl=0)

There are two folders:
- input_images/ (raw images from remote control)
- label_regions/ (labeled regions of the input images)

The name of the labeled images is as follow: **"x_center"-"y_center"\_"id".jpg**

For example:
- `0-28_452-453r0.jpg`
=> center = (0, 28)
| id = "452-453r0"

- `6-22_691-23sept1506162644_2073r2.jpg`
=> center = (6, 22)
| id = "691-23sept1506162644_2073r2"

## How to run everything ?

For installation, see section **Installation**.

## Autonomous mode

Main script, it will try to follow a black&white line.
```
python main.py
```

## Remote Control Mode

0. You need a computer in addition to the raspberry pi
{'fraction_non_alphanumeric': 0.12010796221322537, 'fraction_numerical': 0.1522267206477733, 'mean_word_length': 5.218120805369128, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 14, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3885696', 'n_tokens_mistral': 1834, 'n_tokens_neox': 1513, 'n_words': 298}