- Notifications
You must be signed in to change notification settings - Fork1
License
NotificationsYou must be signed in to change notification settings
ucbdrive/pyTORCS
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Python interface forThe Open Racing Car Simulator (TORCS)
- Go to "Software & Updates" in Ubuntu 16.04 system settings, check "source code" in "Ubuntu Software" tab.
- DownloadNVIDIA-Linux-x86_64-415.25.run(for other versions, visitNVIDIA's official website).
- Blacklist Nouveau.
sudo bash -c"echo blacklist nouveau > /etc/modprobe.d/blacklist-nouveau.conf"sudo bash -c"echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nouveau.conf"sudo update-initramfs -usudo reboot
- Install graphics driver with
--no-opengl-files
flag.sudo chmod a+x NVIDIA-Linux-x86_64-415.25.runsudo service lightdm stopsudo bash NVIDIA-Linux-x86_64-415.25.run --no-opengl-files
Note that in order to install torcs on your computer system, you may need toinstall CUDA driver without opengl libs. The gym-TORCS environmenthas only been tested on Ubuntu 16.04 environment, and currently it does notsupport windows or macOSX environment.
git clone https://github.com/ucbdrive/pyTORCScd pyTORCSbash install.sh
importnumpyasnpimportgymimportpy_TORCSenv=gym.make('TORCS-v0')obs,info=env.reset()obs,reward,terminal,info=env.step(np.array([1.0,0.0]))
Have fun!