Docker image for espdrone UAVIONICS DIP
452
This repository hosts the Docker image for espdrone project.
The docker image contains the following features:
In addition, GUI applications are supported by Docker GUI and nvidia-docker:
Before running the Docker container, make sure that docker is installed on your system.
To pull the Docker image:
docker pull nelsenew/espdrone:latest
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.
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 ^
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
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
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 \
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.
Content type
Image
Digest
Size
1.3 GB
Last updated
about 5 years ago
docker pull nelsenew/espdrone