Udacity have done some great work building a self driving car simulator for their online Nanodegree course, which makes things easier for us budding enthusiasts, as we can get up and running quickly by piggy backing on their work. Good thing is the sim is open source and on github. That is to say sim, well it is more like a project built using the Unity Game Engine. So we won’t be installing the sim, as much as we are installing Unity3D and running Udacity’s car sim project.
Note: As Unity Game Engine shares a name with a Linux desktop environment I will be referring to Unity here on out as, Unity3D, to avoid any confusion.
1. Install Unity3D Engine
The car sim was built using an older version of Unity3D and we need to install that exact version.
The old Unity3D builds were published to a forum with the download link in the post body. I have no idea why they did it like this, I’m guessing the Linux builds were not very well supported back then.
https://beta.unity3d.com/download/f5287bef00ff/public_download.html
Install dependencies and run the install
sudo apt install gconf-service lib32gcc1 lib32stdc++6 libc6-i386 libgconf-2-4 npmsudo dpkg -i ~/Downloads/unity-editor_amd64-5.5.1xf1Linux.deb
If you get error about unmet dependencies you may need to run, and retry
sudo apt --fix-broken install
2. Allow larger downloads for Git (unless you are using zip file)
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
3. Git clone the Udacity Self-Driving Car Simulator
git clone https://github.com/udacity/self-driving-car-sim.git
4. Make the file executable
sudo chmod +x ~/Downloads/beta_simulator_linux/beta_simulator.x86_64
5. Run the simulator from your download location
~/Downloads/beta_simulator_linux/beta_simulator.x86_64
You should then go straight into the pre-run options
If you’re looking to run with Nvidia dedicated graphics you can simply run
RUN_GRAPH=true ~/Downloads/beta_simulator_linux/beta_simulator.x86_64
And you can press Alt+F4 to exit to simulator