To run gym_torcs with ubutnu16

Preface

I had a hard time building the environment to execute gym_torcs with ubutnu16, so I will leave it as a memorandum.

What is gym_torcs?

Please google.

To run gym_torcs with ubutnu16

Before installing gym_torcs, first install the following three.

sudo apt-get install xautomation
sudo pip3 install bumpy
sudo pip3 install gym

Next, download gym_torcs_master from ugo-nama-kun's git. https://github.com/ugo-nama-kun/gym_torcs

After downloading, Rewrite line 64 of gym_torcs / vtorcs-RL-color / src / modules / simu / simuv2 / simu.cpp.

simu.cpp


if (isnan(car->ctrl->gear) || isinf(car->ctrl->gear)) car->ctrl->gear = 0;

simu.cpp


if (isnan((float)(car->ctrl->gear)) || isinf((float)(car->ctrl->gear))) car->ctrl->gear = 0;

After rewriting, go to gym_torcs / vtorcs-RL-color and enter the following command in the terminal.

sudo apt-get install libglib2.0-dev  libgl1-mesa-dev libglu1-mesa-dev  freeglut3-dev  libplib-dev  libopenal-dev libalut-dev libxi-dev libxmu-dev libxrender-dev  libxrandr-dev libpng12-dev 
./configure
make
sudo make install
sudo make datainstall

If you can write torcs in the terminal and execute it, it is successful.

You can see the demo by running snakeoil3_gym.py in gym_torcs / vtorcs-RL-color.

python3 snakeoil3_gym.py


References

http://www.jianshu.com/p/a3432c0e1ef2 https://research.preferred.jp/2016/05/

Recommended Posts

To run gym_torcs with ubutnu16
Run prepDE.py with python3
Run Blender with python
Run iperf with python
Settings when you want to run python-mecab with travis
Setting to run application in subdirectory with nginx + uwsgi
I want to run a quantum computer with Python
Try to factorial with recursion
Connect to BigQuery with Python
Run python with PyCharm (Windows)
[TensorFlow 2 / Keras] How to run learning with CTC Loss in Keras
Run Python with CloudFlash (arm926ej-s)
Let's run Excel with Python
Connect to Wikipedia with Python
Post to slack with Python 3
Connect to Postgresql with GO
Output to syslog with Loguru
Introduction to RDB with sqlalchemy Ⅰ
Easy to make with syntax
How to update with SQLAlchemy?
How to cast with Theano
I noticed while trying to run ninix-aya with Docker (Part 3)
How to run an app built with Python + py2app built with Anaconda
How to run Notepad ++ Python
Run Label with tkinter [Python]
How to Alter with SQLAlchemy?
Switch python to 2.7 with alternatives
Write to csv with Python
How to separate strings with','
Run Apache-Spark with IPython Notebook
How to RDP with Fedora31
2 ways to deal with SessionNotCreatedException
Run DHT22 with RasPi + Python
How to Delete with SQLAlchemy?
Changes to run "Using Cloud Dataflow + Cloud Pub / Sub + Fluentd ..." with SDK 2.1
I want to run Rails with rails s even in vagrant environment
How to run Jupyter and Spark on Mac with minimal settings
[TensorFlow] If you want to run TensorBoard, install it with pip
Convert .ipynb to .html (with BatchFile)
How to cancel RT with tweepy
Steps to develop Django with VSCode
Python: How to use async with
Link to get started with python
Add fields to features with ArcPy
Connect to multiple databases with SQLAlchemy
[Python] Write to csv file with Python
What to do with Magics install
Create folders from '01' to '12' with python
Preparing to run Flask on EC2
Run Rotrics DexArm with python API
Try to operate Facebook with Python
Output to csv file with Python
Run the app with Flask + Heroku
Run mruby with Python or Blender
How to use virtualenv with PowerShell
How to deal with imbalanced data
How to install python-pip with ubuntu20.04LTS
How to deal with imbalanced data
Stream videos to Chromecast with Gravio
Try to profile with ONNX Runtime
Convert list to DataFrame with python