Sign inSign up

nelsenew/espdrone

By nelsenew

•Updated about 5 years ago

Docker image for espdrone UAVIONICS DIP

Image
0

452

nelsenew/espdrone repository overview

⁠Espdrone Docker Images

This repository hosts the Docker image for espdrone project.

⁠Features

The docker image contains the following features:

  • Ubuntu 20.04 with GDM.
  • ROS Noetic.
  • ArUco library version 3.1.12.
  • Screen: Terminal multiplexer.
  • Git.

In addition, GUI applications are supported by Docker GUI and nvidia-docker:

  • RViz: ROS Visualization tools.
  • Gazebo: ROS Simulation tools.
  • Gedit: Ubuntu Text editor.
  • Nautilus: Ubuntu File Explorer.

⁠User Guide

Before running the Docker container, make sure that docker is installed on your system.

To pull the Docker image:

docker pull nelsenew/espdrone:latest
⁠Working with the docker container.

To run the Docker container for the espdrone project, you have to run the docker on interactive mode -it and attached both espdrone-lib-python⁠ and catkin_ws to the docker volume. To run GUI Applications inside the docker container, X11 port forwarding and if possible, GPU hardware acceleration with docker gpu support such as nvidia-docker are required.

⁠Windows
⁠CLI

Use the following command to run the container with only CLI application.

docker run -it ^
    --volume="<path/to/catkin_ws>:/catkin_ws" ^
    --volume="<path/to/espdrone-lib-python>:/espdrone-lib-python" ^
    nelsenew/espdrone:latest ^
⁠GUI

In Windows, port forwarding is not yet installed. The common one is to setup VcXsrv ⁠ on your system.

Once everything is setup, the following batch script should be sufficient to run the docker container with GUI applications. run_espdrone_container.bat

docker run  -it  ^
            --volume="<path/to/catkin_ws>:/catkin_ws" ^
            --volume="<path/to/espdrone-lib-python>:/espdrone-lib-python"  ^
            -e DISPLAY=host.docker.internal:0.0 ^
            -e LIBGL_ALWAYS_INDIRECT=0  ^
            nelsenew/espdrone:latest

Execute the script

run_espdrone_container.bat
⁠MAC
⁠CLI

Use the following command to run the container with only CLI application.

docker run -it \
    --volume="<path/to/catkin_ws>:/catkin_ws" \
    --volume="<path/to/espdrone-lib-python>:/espdrone-lib-python" \
    nelsenew/espdrone:latest \

Similar to windows, X11 port forwarding is not directly supported in OSx. To solve this, install xQuartz⁠ on your machine. Once everything is setup, the following batch script should be sufficient to run the docker container with GUI applications. run_espdrone_container.zsh

docker run  -it  \
            --volume="<path/to/catkin_ws>:/catkin_ws" \
            --volume="<path/to/espdrone-lib-python>:/espdrone-lib-python"  \
            -e DISPLAY=host.docker.internal:0.0 \
            -e LIBGL_ALWAYS_INDIRECT=0  \
            nelsenew/espdrone:latest

Make the script executable

chmod a+x run_espdrone_container.zsh

Execute the script

./run_espdrone_container.zsh
⁠Ubuntu
⁠CLI

Use the following command to run the container with only CLI application.

docker run -it \
    --volume="<path/to/catkin_ws>:/catkin_ws" \
    --volume="<path/to/espdrone-lib-python>:/espdrone-lib-python" \
    nelsenew/espdrone:latest \
⁠GUI

In ubuntu, X11 port forwarding has been installed. The following bash script should be sufficient to run the docker container with GUI applications.

run_espdrone_container.bash

XAUTH=/tmp/.docker.xauth

xauth_list=$(xauth nlist :0 | tail -n 1 | sed -e 's/^..../ffff/')
if [ ! -f $XAUTH ]; then
    if [ ! -z "$xauth_list" ]; then
        echo $xauth_list | xauth -f $XAUTH nmerge -
    else
        touch $XAUTH
    fi
    chmod a+r $XAUTH
fi

file $XAUTH
ls -FAlh $XAUTH

docker run -it \
    --env="DISPLAY=$DISPLAY" \
    --env="QT_X11_NO_MITSHM=1" \
    --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
    --env="XAUTHORITY=$XAUTH" \
    --volume="$XAUTH:$XAUTH" \
    --volume="<path/to/your_catkin_ws>:/catkin_ws" \
    --volume="<path/to/espdrone-lib-python>:/espdrone-lib-python" \
    --net=host \
    --privileged \
    --runtime=nvidia \
    nelsenew/espdrone:latest \
    bash

Make the script executable

chmod a+x run_espdrone_container.bash

Execute the script

./run_espdrone_container.bash

For more information on GPU acceleration with docker on Ubuntu, please check the following link from ROS Wiki⁠.

Tag summary

Content type

Image

Digest

Size

1.3 GB

Last updated

about 5 years ago

docker pull nelsenew/espdrone