Example use of Neural Network to drive
Organizers have created a neural network that can somewhat drive on the track as a proof of concept for the possibility of such solution.
Reminder: To control the car the commands format in windows and linux are different:
- In windows:
the line controls_queue.send_json(next_controls) needs to send a next_controls dictionary of format {"p":16565,"c":1593708369816,"g":0,"s":-0.08,"t":0.2703,"b":0}
- In Linux:
the line controls_queue.send_json(next_controls) needs to send a next_controls dictionary of format {"d_steer":0.8,"d_throttle":0.68,"d_gear":1}
The difference originates from the fact that connection is handled by .exe file in Windows and by RCSnail-Connector in Linux.
Also, the connecting program needs to know commands come from the AI, not controller. for that:
WIN: AI box needs to be ticked in .exe file in windows to allow model to control the car.
LIN: Default values in config files should be suitable in Linux (should give full command to the model).
RUNNING AN EXAMPLE NETWORK
- Checkout the version of AI-lite found here: https://github.com/RDTm/RCSnail-AI-lite/tree/master/src
- pick your main file to launch - windows or ubuntu
- download the network link
- make sure the correct modal name & location is given in config/configuration.yml
- launch the AI-lite/main_{OS}.py
- launch the connector (in ubuntu) or the RCSnail.exe file
This should give a really bad driving model, that neverhteless does sth slightly better than random, as displayed in the promo video (the luckiest run it had was used there, often it crashes much earlier).
The used model was trained using a modified version of the code in https://github.com/martinliivak/RCSnail-AI/notebooks