Skip to content
Isabelle Eysseric edited this page Dec 16, 2022 · 7 revisions

SSIM-Sim (Youtrack)   •  SNOW (Website)   •  Reinforcement-Learning-Research-Project (GitHub)   •  Reinforcement-Learning-Research-Project (Wiki)   •  isabelleysseric (Docker)   •  User: isabelleeysseric (Fuel Ignition Gazebo)   •  Models: NORLAB (Fuel Ignition Gazebo)   •  NORLAB (Laboratoire de recherche)   •  GLO-4001-introduction-a-la-robotique-mobile (Cours)

isabelleysseric (GitHub)   •  isabelleysseric.com (Portfolio)   •  isabelle-eysseric (LinkedIn)



After finding the ideal simulator for our research laboratory, we had to deploy it. On this page you will find all the necessary information on the images of Gazebo Ignition (Fortress version) in order to be able to install it in a Docker environment or directly on your computer with the bash files.





Figure: Docker from K21Academy website



Github repositories



The Gazebo-Ignition folder is an image of the binary installation of Gazebo Ignition without the ROS integration and the Docker-compose-ignition folder contains the images of its source installation plus the ROS2 integration and the bridge for the ROS1 integration Noetic.



Supports

In this folder you have several installation methods (Binary or Source) but also several versions of Ubuntu (18.04 or 20.04) or several versions of Gazebo Ignition (Fortress or others).

Currently, there is Gazebo Ignition (Fortress) on Ubuntu 20.04 but you have a choice with the installation (Binary or Source).



Plateform

  • Ubuntu 20.04 (Focal)

Gazebo Ignition Versions

  • Fortress

Installations Type

  • Binary
  • Source


Ressources

GeeksforGeeks: Somes tutorials for Docker

Docker Docs: Get Started - Part 2: Sample application
Docker Docs: Docker Desktop for Linux (Beta)

DockerHub: hello-world
DockerHub gazebo Official image DockerHub: naokitakahashi12/ignition

Github: Gazebo Ignition tooling - gzdev
Github: NaokiTakahashi12/docker-ignition-robotics



Tutorials

How to Get Started with Docker



Instructions

Step 1: Download the folder docker-ignition

sudo git clone https://github.com/isabelleysseric/Reinforcement-Learning-Research-Project/tree/main/DOCKER_Ignition.git

Step 2: Extract it on /home/user/

unzip docker-ignition.zip

Step 3: Build all containers from the folder docker-ignition

cd /home/user/docker-ignition/
make build

Step 4: Build a specific container, for example here: binary/focal/fortress

cd /home/user/docker-ignition/
make fortress-focal


Create an application in Docker

Link: GeeksforGeeks - Intrduction to Docker
Link: Docker tutorial - DockerHub


My Variables:

<user>: Norlab
<image name>: python-test
<image ID>: 8ddf308587b2
<tag>: latest
<DockerHub username>: isabelleysseric 


Create a Docker container:

Step 1: Create a folder with 2 files

gedit /home/<user>/Dockerfile
gedit /home/<user>/main.py

Step 2: Create a Docker image

docker build -t <image name> .

Step 3: Run the Docker image

docker run <image name>

Step 4: See list Docker images

docker images


Push on Docker Hub:


Step 5: Login on Hub Docker

docker login
docker login -u <username>
focker login -u <username> -p <password>

Step 6: Create Repository on Hub Docker Link: https://hub.docker.com/repositories


Step 6: Tag your image

docker tag <image ID> <DockerHub username>/<image name>:<tag>

Step 7: Push your image to Docker Hub repository

docker push <DockerHub username>/<image name>


Load/Save from Docker Hub:


Step 8: Fetch the image from Docker Hub

docker rmi -f <image ID>

Step 8: Run the image from Docker Hub

docker run <DockerHub username>/python-test

Step 9: Save the Docker image

docker save <image name> > <image name>.tar

Step 10: Load the Docker container from the archived taf file

docker load --input <image name>.tar




Figure: troubleshooting-it-admin from Tenor site



Troubleshooting for Docker

Hello, during my project to create a Docker container for the Gazebo Ignition simulator (Fortress version) I had some problems and found some solutions. Some solutions solved my problems, others not completely so if you have better solutions or other problems that you have solved and that you would like to share, do not hesitate to share them I will add them to the list.


Thank you for your contribution and hoping that this section can help you too.



- PROBLEM 1: Docker login  

Link

Problem:

docker login

Solution: delete the file config.json from /home/user/.docker/ on your desktop.

rm -R /home/<user>/.docker/config.json
docker login

- PROBLEM 2: Docker login  

Link

Problem:

sudo docker login
Error saving credentials: error storing credentials - err: exit status 1, out: `pass not initialized: exit status 1: Error: password store is empty. Try "pass init".`

Solution:

wget https://github.com/docker/docker-credential-helpers/releases/download/v0.6.0/docker-credential-pass-v0.6.0-amd64.tar.gz  
unpack tar -xf docker-credential-pass-v0.6.0-amd64.tar.gz  
docker-credential-pass  
apt install gpg pass  
gpg --generate-key  
pass init <gpg-id>
pass insert docker-credential-helpers/docker-pass-initialized-check  
docker-credential-pass list  
nano ~/.docker/config.json
"credsStore": "pass"
docker login

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

Problem:

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

Solution:

RUN apt-get install python

- PROBLEM 4: debconf: delaying package configuration, since apt-utils is not installed  

Link

Problem:

debconf: delaying package configuration, since apt-utils is not installed

Solution:

apt-get install apt-utils

- PROBLEM 5: gpg: can't connect to the agent: No such file or directory   

Problem:

gpg: failed to start agent '/usr/bin/gpg-agent': No such file or directory
gpg: can't connect to the agent: No such file or directory

Solution:

apt-get install gpg-agent

- PROBLEM 6: E: Unable to locate package –yes  

Problem:

–assume-yes
E: Unable to locate package –yes

Solution: check for the first symbole

-assume-yes

- PROBLEM 7: qt.qpa.xcb: could not connect to display 

Problem:

sudo docker run -it <myimage>
root@ ign gazebo shapes.sdf

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

[Err] [Server.cc:109] Failed to find world []

Solution: It's not perfect, so if you have better, tell me please.

ENV QT_DEBUG_PLUGINS=1

Or

ENV DEBIAN_FRONTEND=noninteractive
…
ENV DEBIAN_FRONTEND=teletype

- PROBLEM 8 : dpkg-preconfigure: unable to re-open stdin  

Problem:

dpkg-preconfigure: unable to re-open stdin

Solution:

# Use baseimage-docker's init system after your ENV and before your RUN
CMD ["/sbin/my_init"]

- PROBLEM 9 : Warning: apt-key output should not be parsed

Problem:

Warning: apt-key output should not be parsed (stdout is not a terminal)

Solution:

RUN apt-get 

- PROBLEM 10 : pybind11 is missing: Python interfaces are disabled

Problem:

--- stderr: ignition-math6
CMake Warning at /ign_ws/install/share/cmake/ignition-cmake2/cmake2/IgnConfigureBuild.cmake:55 (message):
   CONFIGURATION WARNINGS:
   -- pybind11 is missing: Python interfaces are disabled.
Call Stack (most recent call first):
  CMakeLists.txt:101 (ign_configure_build)
---

Solution: I don't have the solution yet


- PROBLEM 11: Missing dependency [pxr]

Problem:

--- stderr: sdformat12
CMake Warning at /ign_ws/install/share/cmake/ignition-cmake2/cmake2/IgnConfigureBuild.cmake:55 (message):
   CONFIGURATION WARNINGS:
   -- Skipping component [usd]: Missing dependency [pxr].
      ^~~~~ Set SKIP_usd=true in cmake to suppress this warning.
   
Call Stack (most recent call first):
  CMakeLists.txt:122 (ign_configure_build)
--- 

Solution: I don't have the solution yet


- PROBLEM 12: Missing dependency [DART]

Problem:

 --- stderr: ignition-physics5
CMake Warning at /ign_ws/install/share/cmake/ignition-cmake2/cmake2/IgnUtils.cmake:197 (find_package):
  Found package configuration file:

    /usr/share/dart/cmake/DARTConfig.cmake

  but it set DART_FOUND to FALSE so package "DART" is considered to be NOT
  FOUND.
Call Stack (most recent call first):
  CMakeLists.txt:68 (ign_find_package)


CMake Warning at /ign_ws/install/share/cmake/ignition-cmake2/cmake2/IgnConfigureBuild.cmake:55 (message):
   CONFIGURATION WARNINGS:
   -- Skipping component [dartsim]: Missing dependency [DART] (Components: collision-bullet, collision-ode, utils, utils-urdf).
      ^~~~~ Set SKIP_dartsim=true in cmake to suppress this warning.
   
Call Stack (most recent call first):
  CMakeLists.txt:100 (ign_configure_build)
---

Solution: I don't have the solution yet


- PROBLEM 13: Missing dependency [OptiX]

Problem:

Starting >>> ignition-rendering6
--- stderr: ignition-rendering6
CUDA_TOOLKIT_ROOT_DIR not found or specified
CMake Warning at /ign_ws/install/share/cmake/ignition-cmake2/cmake2/IgnConfigureBuild.cmake:55 (message):
   CONFIGURATION WARNINGS:
   -- Skipping component [optix]: Missing dependency [OptiX].
      ^~~~~ Set SKIP_optix=true in cmake to suppress this warning.
   
Call Stack (most recent call first):
  CMakeLists.txt:170 (ign_configure_build)
---

Solution: I don't have the solution yet


- PROBLEM 14 : Could not find a package configuration file provided by "..." 

Problem:

 --- stderr: ignition-sensors6
CMake Warning at /ign_ws/install/lib/cmake/ignition-rendering6/ignition-rendering6-config.cmake:195 (find_package):
  By not providing "Findignition-rendering6-ogre2.cmake" in CMAKE_MODULE_PATH
  this project has asked CMake to find a package configuration file provided
  by "ignition-rendering6-ogre2", but CMake did not find one.

  Could not find a package configuration file provided by
  "ignition-rendering6-ogre2" (requested version 6.3.1) with any of the
  following names:

    ignition-rendering6-ogre2Config.cmake
    ignition-rendering6-ogre2-config.cmake

  Add the installation prefix of "ignition-rendering6-ogre2" to
  CMAKE_PREFIX_PATH or set "ignition-rendering6-ogre2_DIR" to a directory
  containing one of the above files.  If "ignition-rendering6-ogre2" provides
  a separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  /ign_ws/install/share/cmake/ignition-cmake2/cmake2/IgnUtils.cmake:197 (find_package)
  CMakeLists.txt:69 (ign_find_package)
---

Solution: I don't have the solution yet


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

Link

Problem:

run apt update

Solution: apt is for beautiful output on terminal but apt-get and apt-cache are for scripts

run apt-get update

- PROBLEM 16: /bin/sh: 1: sudo: not found  

Link

Problem:

sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null

Solution: The Dockerfile already run as root during docker build so you don't need to use sudo.

tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null

- PROBLEM 16:  

Link

Problem:

Solution: