This repository contains the containerized environment for OpenUAV simulations with GPU acceleration and web-based access.
The OpenUAV container consists of two main component groups:
- Gazebo: 3D robotics simulator
- Unity: 3D visualization engine
- ROS: Robot Operating System framework
- PX4: UAV autopilot software
- QGroundControl: Ground control station
- NoVNC: Web-based VNC client (Port 40001)
- TurboVNC: High-performance VNC server
- SSH/SSHFS: Secure shell access and filesystem mounting (Port 22)
┌─────────────────────────────────────────────────────────┐
│ OpenUAV Container │
│ ┌─────────────────────────────────────────────┐ │
│ │ Simulation Components │ │
│ │ ┌────────┐ ┌───────┐ ┌─────┐ ┌────┐ │ │
│ │ │ Gazebo │ │ Unity │ │ ROS │ │PX4 │ │ │
│ │ └────────┘ └───────┘ └─────┘ └────┘ │ │
│ │ ┌─────────────────┐ │ │
│ │ │ QGroundControl │ │ │
│ │ └─────────────────┘ │ │
│ └─────────────────────────────────────────────┘ │
│ │
│ ┌─────────────┐ ┌──────────┐ ┌──────────┐ │
│ │ NoVNC │ │ TurboVNC │ │SSH/SSHFS │ │
│ │ (40001) │ │ │ │ (22) │ │
│ └─────────────┘ └──────────┘ └──────────┘ │
└─────────────────────────────────────────────────────────┘
The OpenUAV platform uses Nginx as a reverse proxy to handle both HTTP and SSH connections:
-
Nginx Proxy
- HTTP proxy module: Handles web interface access
- Stream module: Manages SSH connections
- Domain format: cpsvo-.openuav.us
-
DNS Resolver
- Resolves container-specific URLs to Docker network IPs
- Handles dynamic container addressing
-
Container Instances
- Multiple containers run in parallel
- Each container has:
- Web interface (NoVNC)
- SSH access
- Unity + Gazebo simulation environment
┌─────────────────────────────────────────────────────────┐
│ Nginx Proxy │
│ ┌───────────────────┐ ┌────────────────────┐ │
│ │ HTTP Module │ │ Stream Module │ │
│ └─────────┬─────────┘ └──────────┬─────────┘ │
└────────────┼──────────────────────────┬┼───────────────┘
│ ││
┌────────────┼──────────────────────────┼┼───────────────┐
│ ▼ ▼▼ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Container 1 │ │ Container 2 │ ... │
│ │digital-twin-1 │ │digital-twin-2 │ │
│ └─────────────────┘ └─────────────────┘ │
│ Docker Network │
└─────────────────────────────────────────────────────────┘
- Ubuntu 20.04 or later
- NVIDIA GPU with 470+ drivers
- Docker 20.10+
- NVIDIA Container Toolkit
-
Install NVIDIA drivers:
ubuntu-drivers autoinstall
-
Install Docker:
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh
-
Install NVIDIA Container Toolkit:
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list sudo apt-get update sudo apt-get install -y nvidia-docker2
-
Clone the repository:
git clone https://github.com/your-org/openuav2.git cd openuav2
-
Build the image:
docker build -t openuav:px4-sitl .
-
Start a container:
bash run_container.sh
-
Access via web browser:
https://digital-twin-xxxxx.deepgis.org
-
Check X server logs:
docker exec CONTAINER_ID cat /var/log/Xorg.1.log
-
Verify GPU access:
docker exec CONTAINER_ID nvidia-smi
-
Test OpenGL:
docker exec CONTAINER_ID vglrun glxinfo
-
Check VNC server:
docker exec CONTAINER_ID netstat -tulpn | grep 590
-
Verify noVNC:
docker exec CONTAINER_ID netstat -tulpn | grep 40001
- Black screen: Usually X server or GPU driver issue
- No 3D acceleration: Check VirtualGL configuration
- Connection refused: Check port mappings and firewall
sudo pkill -f "Xorg :1" sudo Xorg :0 -isolateDevice PCI:82:0:0 -config /etc/X11/xorg.conf -noreset vt1 -e DISPLAY=:1 # For TurboVNC's 2D operations -e VGL_DISPLAY=:0 # For GPU-accelerated 3D rendering
- Fork the repository
- Create your feature branch
- Submit a pull request
MIT License - See LICENSE file