Configuration Reference

February 5, 2026 ยท View on GitHub

Complete reference for all parameters, topics, and configuration options.


Launch File Parameters

All parameters can be configured via launch files or command line:

ros2 launch depth_anything_3_ros2 depth_anything_3.launch.py \
  parameter_name:=value

Core Parameters

ParameterTypeDefaultDescription
model_namestringdepth-anything/DA3-BASEHugging Face model ID or local path
devicestringcudaInference device (cuda or cpu)
cache_dirstring""Model cache directory (empty for default)

Inference Parameters

ParameterTypeDefaultDescription
inference_heightint518Height for inference (model input)
inference_widthint518Width for inference (model input)
input_encodingstringbgr8Expected input encoding (bgr8 or rgb8)
normalize_depthbooltrueNormalize depth to [0, 1] range

Output Parameters

ParameterTypeDefaultDescription
publish_coloredbooltruePublish colorized depth visualization
publish_confidencebooltruePublish confidence map
colormapstringturboColormap for visualization

Performance Parameters

ParameterTypeDefaultDescription
queue_sizeint1Subscriber queue size (1 = latest frame only)
log_inference_timeboolfalseLog performance metrics

Available Models

Model IDParametersVRAMUse Case
depth-anything/DA3-SMALL0.08B~1.5GBFast inference, real-time robotics
depth-anything/DA3-BASE0.12B~2.5GBBalanced performance (recommended)
depth-anything/DA3-LARGE0.35B~4GBHigher accuracy
depth-anything/DA3-GIANT1.15B~6.5GBBest accuracy, slower
depth-anything/DA3NESTED-GIANT-LARGECombined~8GBMetric scale reconstruction

Model Licensing

ModelLicenseCommercial Use
DA3-SMALLApache-2.0Yes
DA3-BASECC-BY-NC-4.0No (contact ByteDance)
DA3-LARGECC-BY-NC-4.0No (contact ByteDance)
DA3-GIANTCC-BY-NC-4.0No (contact ByteDance)

Topics

Subscribed Topics

TopicTypeDescription
~/image_rawsensor_msgs/ImageInput RGB image from camera
~/camera_infosensor_msgs/CameraInfoOptional camera intrinsics

Published Topics

TopicTypeDescription
~/depthsensor_msgs/ImageDepth map (32FC1 encoding, normalized 0-1)
~/depth_coloredsensor_msgs/ImageColorized depth (BGR8, for visualization)
~/confidencesensor_msgs/ImageConfidence map (32FC1)
~/depth/camera_infosensor_msgs/CameraInfoCamera info for depth image

Topic Remapping

Remap topics to match your camera setup:

ros2 launch depth_anything_3_ros2 depth_anything_3.launch.py \
  image_topic:=/my_camera/image_raw \
  camera_info_topic:=/my_camera/camera_info

Resolution Guidelines

Resolution must be divisible by 14 (ViT patch size). Common presets:

PresetResolutionUse Case
Low308x308Fastest, obstacle avoidance, memory-constrained
Medium518x518Balanced speed and detail (default)
High728x728More detail, slower inference
Ultra1024x1024Maximum detail, requires high-end GPU

Platform-Specific Recommendations

PlatformRecommended ResolutionNotes
Orin Nano 4GB/8GB308x308Memory-constrained
Orin NX 8GB308x308Good balance
Orin NX 16GB518x518Recommended default
AGX Orin 32GB/64GB518x518Can go higher if needed

Colormap Options

Available colormaps for colormap parameter:

ColormapDescription
turboRainbow-like, good contrast (default)
viridisPerceptually uniform, colorblind-friendly
plasmaWarm colors, good for presentations
infernoDark to light, high contrast
magmaSimilar to inferno, softer
jetClassic rainbow (not recommended)

Environment Variables

Docker Environment Variables

VariableDefaultDescription
DA3_MODELdepth-anything/DA3-BASEHuggingFace model ID
DA3_INFERENCE_HEIGHT518Inference height
DA3_INFERENCE_WIDTH518Inference width
DA3_VRAM_LIMIT_MB(auto)Override detected VRAM
DA3_DEVICEcudaInference device
DA3_USE_SHARED_MEMORYfalseUse shared memory IPC

Hugging Face Environment Variables

VariableDescription
HF_HOMECustom cache directory for models
TRANSFORMERS_CACHEAlternative cache directory
HF_HUB_OFFLINESet to 1 for offline mode

Configuration File Example

Create a YAML file for complex configurations:

# my_config.yaml
depth_anything_3:
  ros__parameters:
    # Model
    model_name: "depth-anything/DA3-BASE"
    device: "cuda"

    # Inference
    inference_height: 518
    inference_width: 518
    input_encoding: "bgr8"
    normalize_depth: true

    # Output
    publish_colored: true
    publish_confidence: true
    colormap: "turbo"

    # Performance
    queue_size: 1
    log_inference_time: true

Launch with config file:

ros2 launch depth_anything_3_ros2 depth_anything_3.launch.py \
  params_file:=/path/to/my_config.yaml

QoS Settings

The node uses these QoS profiles:

Image Subscriber

  • Reliability: BEST_EFFORT (allows frame drops)
  • Durability: VOLATILE
  • History: KEEP_LAST (depth 1)

Depth Publisher

  • Reliability: RELIABLE
  • Durability: VOLATILE
  • History: KEEP_LAST (depth 10)

Next Steps