Tinker-Twins/AutoDRIVE

Issue running F1Tenth Autonomously when building simulator from source

Closed this issue · 1 comments

Hi! First off, this is a fantastic project!

Here's a description of my issue:
When I download the latest release of AutoDRIVE Simulator (0.3.0), I am able to use the devkit's autodrive_py API along with a simple follow-the-gap algorithm to make an autonomous agent drive laps around the track. When I installed the simulator from source as a Unity project (editor version 2021.3.39f1) and built the F1Tenth scene, I get a working simulator app which allows me to drive manually. I am able to connect to the simulator with the same script as before and it receives sensor data and sends commands, but when switching to autonomous mode in this built version, the vehicle doesn't move. I verified it wasn't an issue with the script by running it again in the version of the simulator I downloaded from the releases. I can also verify that when I run the scene within Unity itself, I can still manually drive and connect, but autonomous messages don't seem to go through.

There are no error logs for me to debug any issue, and I can verify that sensor data is being received and a connection is being established, so i'm not sure why an agent won't drive when I build the sim from Unity. I am on MacOS (apple silicon). I am fairly new to Unity, so perhaps I am building the project incorrectly or a setting is missed out? My end goal is to create more tracks for the F1Tenth sim so I can generate a diverse set of training data. If you could help me figure out where I'm going wrong with this and point me in the right direction to add new tracks, and potentially update the docs to inform new users how to correctly build scenes, I'd be very grateful. Thanks!!

Hi @charsterekt,

Did you download the simulator source files from AutoDRIVE-Simulator branch or the AutoDRIVE Simulator 0.3.0 release (the Source code.zip or Source code.tar.gz files)?

In case you pulled directly from the AutoDRIVE-Simulator branch, chances are that the simulator may have been updated since the release and the Python API from AutoDRIVE Devkit 0.3.0 might not be compatible with it.

The issue that you are experiencing happens when the Devkit demands something that the Simulator can't provide or vice-versa, in which case either of the two keeps waiting for the data to become available or raises an internal error (especially within the simulator), which is not displayed externally.

Let us know if you are still facing an issue when you download the source code from the AutoDRIVE Simulator 0.3.0 release.