Record the program running process of the article "Deep Reinforcement learning for real autonomous ..."

Article information

题目:Deep Reinforcement learning for real autonomous mobile robot navigation in indoor environments

作宇:Hartmut Surmann, Christian Jestel, Robin Marchel, Franziska Musberg, Houssem Elhadj, Mahbube Ardani

Source: arXiv

Original link: https://arxiv.org/abs/2005.13857

Source code link: https://github.com/RoblabWh/RobLearn
insert image description here

Preparation

1. Environmental requirements

  • Python 3.5 / 3.6
  • gnuplot-x11 (for visualization)
  • cuda (=9.0)
  • hidden (=7.1.2)
  • hard (=2.2.2)
  • tensorflow-gpu (=1.9.0)

2. Anaconda environment construction

First use Anaconda to create a virtual environment for running this program. The environment is created using the following instructions

conda create -n py35_tf python=3.5

The blogger uses Python3.5, but Python3.6 is also acceptable for actual use.

Then install the three modules tensorflow, cudatoolkit, and cudnn. The method given in the original text is to download the installation package and use the sudo dpkgmethod to install it. The blogger also used this method at the beginning. The process of this method is very cumbersome, and strange errors often pop up, and even automatically change the graphics card driver of the computer, resulting in a black screen or abnormal display when starting up.

In this regard, the blogger chose a simpler and rude method:

First, add third-party sources to Anaconda:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes

Second, install three modules at the same time directly using one command

conda install tensorflow-gpu=1.9 cudatoolkit=9.0 cudnn=7.1

This method is simple and crude, and less error-prone. Of course, if readers have problems when using this method, they can also retreat to the next best thing and try the method given in the original text.

In addition to the parts required above, the numpy and keras modules are also essential. The installation of these two modules is very simple, and they conda install ...can be used directly. Here is no more explanation.

3. Simulation process visualization

Finally, we also need to download the software gnuplot-x11, which is used to realize the visualization of navigation simulation. The installation instructions are as follows

apt-get install gnuplot-x11

Other content does not need to be configured, and the GUI window will automatically pop up when the program is run later.

run the program

Note: Readers need to adjust the file according to their own Python version: **'Simulation2d/CMakeLists.txt' **The contents of line 19. If the Python version used by the reader is 3.6, it should be python-py35changed topython.py36

Run the terminal command:

cd NeuronalNetwork 
bash build.sh

Enter the created conda environment:

conda activate py35_tf

Run the training program:

./_ga3c_clean.sh &&
./_ga3c_train.sh

If there is no problem with the previous environment configuration and program initialization, the program will start training normally, and there will be an interface as shown below: At
insert image description here
this point, the program runs successfully!

Guess you like

Origin blog.csdn.net/clashes/article/details/129998654