Resource requirements
Minimum requirements
- CPU: 4 cores
- Memory: 8 GB RAM
- Disk space: 20 GB free
Recommended requirements
- CPU: 6+ cores
- Memory: 16 GB RAM
- Disk space: 50 GB free
The container image itself is approximately 3.5 GB (1 GB base + 2 GB ROS2 + 500 MB Gazebo), but the workspace build artifacts require additional space.
Adjusting resources on Docker Desktop
Docker Desktop (Windows and macOS) limits container resources by default. You need to adjust these settings for optimal performance.Windows and macOS
- Open Docker Desktop from your system tray or applications menu
- Click the gear icon (Settings)
- Navigate to Resources
- Adjust the following sliders:
- CPUs: Set to 4-6 cores (half your total cores recommended)
- Memory: Set to 8-16 GB
- Disk image size: Set to 50 GB or more
- Click Apply & Restart
Linux
On Linux, Docker has direct access to system resources without artificial limits. No configuration is needed unless you want to set explicit limits.Shared memory configuration
The container uses--shm-size=2gb for shared memory, which is required for Gazebo and RViz to function properly.
This is configured in .devcontainer/devcontainer.json:59-64:
Shared memory is used for inter-process communication. If you encounter crashes with Gazebo or RViz, try increasing this to
4gb.Disk space management
The workspace generates build artifacts in several directories:build/- Compilation artifactsinstall/- Built packageslog/- Build and runtime logs
Cleaning build artifacts
To reclaim disk space:Cleaning Docker cache
If Docker is consuming too much disk space:Performance optimization
Windows-specific optimization
Enable WSL 2 backend for better performance:- Docker Desktop → Settings → General
- Check Use WSL 2 based engine
- Click Apply & Restart
macOS-specific optimization
Enable VirtioFS for faster file sharing:- Docker Desktop → Settings → General
- Check Use VirtioFS for file sharing
- Click Apply & Restart
Monitoring resource usage
Check Docker resource usage
Inside the container
Troubleshooting
Container runs slowly
Symptom: Gazebo is laggy, build times are very long Solution: Increase CPU cores and memory allocation to recommended levels (6 cores, 16 GB RAM)“No space left on device” errors
Symptom: Build fails with disk space errors Solution:- Clean build artifacts (see above)
- Run
docker system pruneto clean Docker cache - Increase Docker disk image size in Docker Desktop settings
Out of memory crashes
Symptom: Gazebo crashes, container stops unexpectedly Solution:- Increase memory allocation to 16 GB
- Close other memory-intensive applications
- Increase shared memory with
--shm-size=4gb