Docker profile

Docker is a platform designed for developers and system administrators to build, publish and run distributed applications. Docker container is the basic unit of resource segmentation and scheduling, encapsulates the entire software runtime environment, and is used to build, publish and run distributed applications. It is a cross-platform, portable and easy-to-use container solution.

Docker packages applications and program dependencies into images to keep the consistency of the runtime environment and truly “build once, run anywhere”.

Prometheus docker simulation image has packed the entire environment required for running Prometheus simulation. Pull down the simulation image and the simulation can be started immediately, and the GRAPHICAL interface operation can be carried out through VNC.

Thanks here to Wandgibaut’s vNC_ROS image, which is the base image for the Prometheus Docker emulator here.

Prometheus Docker emulates the image in action

Linux platform is the native support platform of Docker, and using Docker on Linux can get the best user experience. Therefore, the operation of using Prometheus Docker emulator image under Ubuntu is introduced here.

Ubuntu local environment configuration

Install the docker

sudo apt-get update

sudo apt-get install docker

sudo apt install docker.io

Download VNC

Wget www.realvnc.com/download/fi…

Chmod 777 VNC Viewer – 6.19.107 – Linux – x64

Open the VNC

. / VNC Viewer – 6.19.107 – Linux – x64

Download the QGC

Wget s3-us-west-2.amazonaws.com/qgroundcont…

chmod 777 QGroundControl.AppImage

Open the QGC

./QGroundControl.AppImage

Pull the Prometheus Docker image (this step takes some time, just wait)

sudo docker pull shixiaohan/prometheus:publish-2

(note: shixiaohan/Prometheus: publish – 2 Prometheus code in the image is in May 2021 when Prometheus code)

Create a container

Image after the pull, run the following command sudo docker run – p, 5901:5901 shixiaohan/Prometheus: publish – 2

VNC connection

After the container runs (wait about ten seconds) and the terminal displays as shown above, enter 172.17.0.2:5901 in the VNC address box and press EnterAnd I’ll say ContinueThen enter the password headless and click OK

After entering the interface, the following is displayed:

Start the simulation

To start the emulation, open the GNOME terminal inside the container (the default is the GNOME terminal) and run the corresponding emulation command on the Prometheus wiki, just as you would on regular Ubuntu. Below is a screenshot of the pointing flight simulation. Run roslaunch prometheus_gazebo sitl_control.launch directly from the terminal.Round frame crossing:Qr code landing:Astar obstacle avoidance:

After the simulation starts, the QGC ground station that is already open on the local computer ubuntu will be automatically connected

Stop the container

If you do not want to use this container, open a terminal on the local Ubuntu and use sudo docker ps command to view the container ID. (If you want to view the container ID after the container is stopped, use sudo docker ps -a command to view) The red box in the following figure is the container IDThen use the sudo docker stop container ID command to stop the container.

Note when starting this container again

Start the container using sudo docker start container ID and VNC connection. Don’t need to run sudo docker run – p, 5901:5901 shixiaohan/Prometheus: publish – 2 orders, This command will be based on shixiaohan/Prometheus: publish – 2 images to create a new container, rather than before starting the container has been created.

Remove the container

In the case that the corresponding container has been stopped, you can use the command docker rm container ID to delete this container. Note that if there is no image backup for this container before, the original changes made in this container can not be retrieved after the container is deleted. After deleting the container, if you want to create a new container again, Can use the command sudo docker run – p, 5901:5901 shixiaohan/Prometheus: publish – 2 can be based on shixiaohan/Prometheus: publish – 2 Image creates a new container and starts emulation.

Delete Prometheus Docker emulator image

Can use the command docker rmi -f shixiaohan/Prometheus: publish – 2 mandatory delete shixiaohan/Prometheus: publish – 2 the mirror, If we want to use this image with the command sudo docker pull shixiaohan/Prometheus: publish – 2 pull to the local ubuntu.

  • End –

With the rapid development of technology, AMu Lab will keep up with the pace of technology and continue to recommend the latest technology and hardware in the robotics industry to you. The greatest value of our training is to see our trainees improve by leaps and bounds. If you are in the robot industry, please follow our official account, we will continue to publish the most valuable information and technology in the robot industry. Amu Lab is committed to the education of cutting-edge IT technology and intelligent equipment to make robot research and development more efficient!