I had a hard time building the environment to execute gym_torcs with ubutnu16, so I will leave it as a memorandum.
Please google.
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
http://www.jianshu.com/p/a3432c0e1ef2 https://research.preferred.jp/2016/05/
Recommended Posts