Skip to content

This is micro size AI RC Car projects. Using Tensorflow lite for microcontroller.

License

Notifications You must be signed in to change notification settings

masato-ka/micro-airc

Repository files navigation

airc-micro

1. Overview

airc-micro is most tiny AI RC Car project. No camera, no powerful cpu and AI accelerator.

Using simple distance sensor and cheap cpu board such as ESP32, STM32F1xx.

NN is learning on cloud. And deploy to microcontroller by tensorflow lite for microcontroller.

2. Requirement

3. Install

3-1. Install VSCode and Platform IO

Setup VisualStudio Code in your PC. And then install PlatformIO plugin to VSCode. See in here

3-2. Libraly install

Install these libraries by using library manager

3-3. Clone this project

Clone this repository and open top directory with VSCode.

4. Usage

4-1. Collect training data.

  1. Enable to Agent

Setting remote_agent to config.h AGENT_NAME.

const String AGENT_NAME="remote_agent";
const String BLUETOOTH_SUFFIX="AircMicro";

Then build and flush to Your own car.

  1. Collect Data

Your car send telemetry data by Bluetooth Serial. Connect to the ESP32 from your laptop. And run below command.

$ python tools/logger.py -p <BluetoothSerial port> -f <Path to save training data>

4-2. NN learning on Google Colaboratory.

Open In Colab

You can using airccar_micro_tensorflow_keras.ipy nb for training. This notebook train NN with your own dataset. Open notebook with colab. Then upload your traing dataset. And You run all cells. At end of notebook you can download trained model as model of TensorFlow lite for microcontoroller. Further get min_value and max_value for using to normalization.

Simulation version is here: Open In Colab

4-3. Deploy model file

Replace micro-airc/src/model/airc_model.cpp with the download file. And overwrite min_value and max_value in airc_model.h

4-4. Compile and Write to Board

Setting nnagent to config.h AGENT_NAME.

const String AGENT_NAME="nnagent";
const String BLUETOOTH_SUFFIX="AircMicro";

Then build and flush to your ESP32.

5. Release note

Now, This is experimental project. If you interest to this project. Please contact me.

6. Contribution

If you find bug or want to new functions, please write issue.

If you fix your self, please fork and send pull request.

7. LICENSE

This software license under MIT licence.

8. Special Thanks.

  • RumiCar Projects.
  • TensorFlow lite for microcontroller
  • Arduino_TensorFlowLite_ESP32 by tanakamasayuki

9. Author

masato-ka

About

This is micro size AI RC Car projects. Using Tensorflow lite for microcontroller.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published