Ubuntu18.04 uses docker to reproduce the RDS-SLAM compilation part

Record the reproduction process of RDS-SLAM and some of the problems encountered

After downloading RDS-SLAM directly on git, I encountered many problems in the first step of sudo docker-compose build following the README steps. Questions are as follows

1. Error record [WARNING: apt does not have a stable CLI interface. Use with caution in scripts.]

Directly run the dockerfile of RDS-SLAM

Encountered an error:

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Solution:

RUN apt update
Do not use the apt command in a script. If you use the apt command in a script, you may get the “WARNING: apt does not have a stable CLI interface. Use with caution in scripts.” prompt. Use the apt-get command to replace apt and the problem is solved!

RUN apt-get update

2. Error record [W: GPG error: https://developer.do….E: The repository https://develope]

Encountered an error:

Solution:

Modify the code in the dockerfile, add the public key, and add in front of apt-get update:

apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/3bf863cc.pub \

Although it is said to be ubuntu1604, I tried it myself and no error was reported, so it should be okay. problem solved!

3. Error report【ERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/3.6/get-pip.py instead.】

Problem Description:

Reference: About Docker error reporting problem ERROR: This script does not work on python 3.5 The minimum supported Python version_Juezi’s blog-CSDN blog

Solution:

Just change the prompt “https://bootstrap.pypa.io/get-pip.py” in the Dockerfile to the recommended “https://bootstrap.pypa.io/pip/3.6/get-pip.py”. See the error message here and modify it according to the prompt.
It should be noted here that changes cannot be made in the compilation environment (Linux), otherwise the same error will be reported, because only the pip of the host environment is modified, which is different from the Docker environment, so it must be modified in the Dockerfile!

problem solved!

4. Error report [ERROR: Could not find a version that satisfies the requirement comm>=0.1.3 (from ipywidgets; extra == “all”->IPython[all]->-r /root/requirements. txt (line 14)) (from versions: 0.0.1)】

Error when continuing to run

Solution:

I thought it was a problem with the pip2 version, so I changed the pip2 in the error report to pip3 in the dockerfile. After the modification, it was successful!

5. Error record [failed to solve: process “/bin/sh -c /bin/bash -c ‘echo “deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main” > /etc/apt/sources.list.d/ros-latest.list’ & amp; & amp; apt-key adv –keyserver ‘hkp://keyserver.ubuntu.com:80’ –recv -key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 & amp; & amp; apt-get update & amp; & amp; apt install -f & amp; & amp; apt-get install -y ros-melodic-desktop-full” did not complete successfully: exit code : 100】

Here when we configure ROS, there is a network that cannot be fetched.

Solution:

It can be solved by connecting to VPN and running again. But the running time is huge!

6. Error report【ERROR: Rosdep experienced an error: (‘The read operation timed out’,) Please go to the rosdep page [1] and file a bug report with the stack trace below.】

When I installed ros under ubuntu before, this step would get stuck, so it was not surprising when I found this error. I looked at the dockerfile and it said that it was run directly, and if I directly rosdep update later, I would also get an error. . To be honest, I really don’t know how the author managed to run it directly. . . . . . Continue to record errors. . .

Solution:

Find RUN rosdep init in the dockerfile and replace it with

RUN apt-get install python-rosdep \
     & amp; & amp; rosdep init

Just run it and it will be fine, the problem is solved!

7. Error report [ERROR [rdsslam 12/28] RUN rosdep update]

I have to say that sometimes I really don’t remember the problem I solved previously two months later, and then I have to find a solution again, so it’s really important to record it yourself!

Solution:

Reference blog:

ROS rosdep update failed (simple solution)_rosdep update reading in sources list data from /e-CSDN blog

Find the RUN rosdep update line in the dockerfile (the line next to the error above) and modify it to

RUN pip3 install rosdepc \
     & amp; & amp; rosdepc update

Go to build again and it will work, the problem is solved!

8. Error report【ERROR [rdsslam 21/29] RUN wget -c http://mi.eng.cam.ac.uk/~agk34/resources/SegNet/segnet_pascal.caffemodel】

An error was reported here. I checked this URL and it seems that the previous URL is no longer available.

Solution:

Because this is compilation, I plan to delete this instruction directly and then compile it to create a new container and add this model to the container. However, it should be noted that we need to remember the path in this container. This is written in our dockerfile

9. Sometimes due to network problems, there may be some errors during git clone

Just build it a few more times

At this point it has been built and we finally move on to the next step.