agentleFS
Seeed-ProjectsSeeed-Projects/Seeed-Jetson-DevelopTool/skills/claude/deploy-depth-anything-v3/CLAUDE.md

Seeed-Jetson-DevelopTool / deploy-depth-anything-v3

CLAUDE.md57 starsChanged 4 months agoMITView on GitHub

Deploy Depth Anything V3 monocular depth estimation on Jetson AGX Orin with ROS2 Humble integration. Builds a ROS2 workspace with TensorRT-optimized ONNX models for real-time depth map generation from USB camera or video input. Requires JetPack 6.2 and ROS2 Humble.

  • Installs packages

The file

We split this CLAUDE.md into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run one phase at a time. After each phase:

    line 14
  2. Very specific:

    If output contains [STOP] → stop immediately, consult the failure decision tree.

    line 16
  3. Very specific:

    If output ends with [OK] → tell the user "Phase N complete" and proceed to the next phase.

    line 17
  4. Very specific:

    Place it in the ros2-depth-anything-v3-trt/onnx/ directory

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Deploy Depth Anything V3 on Jetson AGX Orin

Depth Anything V3 generates high-quality depth maps from single RGB images. This skill deploys it on Jetson AGX Orin with ROS2 and TensorRT acceleration for real-time robotics use.


Execution model

Run one phase at a time. After each phase:

  • Relay all output to the user.
  • If output contains [STOP] → stop immediately, consult the failure decision tree.
  • If output ends with [OK] → tell the user "Phase N complete" and proceed to the next phase.

Prerequisites

RequirementDetail
HardwareJetson AGX Orin (e.g. reComputer Mini J501)
JetPack6.2
ROS2Humble installed and sourced
CameraUSB camera connected
NetworkInternet for cloning repos and downloading ONNX models

Phase 1 — Install system dependencies (~3 min)

sudo apt update
sudo apt install -y \
    build-essential cmake git libopencv-dev \
    python3-pip python3-colcon-common-extensions v4l-utils
pip3 install numpy opencv-python

[OK] when all packages install without error.


Phase 2 — Configure CUDA environment (~1 min)

echo '
# CUDA Environment
export CUDA_HOME=/usr/local/cuda
export PATH=$CUDA_HOME/bin:$PATH
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
export CUDACXX=$CUDA_HOME/bin/nvcc
' >> ~/.bashrc
source ~/.bashrc
nvcc --version

[OK] when nvcc --version prints CUDA version info. [STOP] if nvcc is not found.


Phase 3 — Install ROS2 camera packages (~2 min)

sudo apt install -y ros-humble-usb-cam ros-humble-cv-bridge \
    ros-humble-image-transport ros-humble-image-geometry ros-humble-rviz2

[OK] when all ROS2 packages install successfully.


Phase 4 — Clone and build the ROS2 workspace (~5 min)

git clone https://github.com/zibochen6/ros2-depth-anything-v3-trt.git
cd ros2-depth-anything-v3-trt
colcon build --packages-select depth_anything_v3 --cmake-args -DCMAKE_BUILD_TYPE=Release
source install/setup.bash

[OK] when colcon build completes with no errors. [STOP] if build fails.


Phase 5 — Download ONNX model and generate TensorRT engines (~10–20 min)

  1. Download the .onnx model from https://huggingface.co/TillBeemelmanns/Depth-Anything-V3-ONNX
  2. Place it in the ros2-depth-anything-v3-trt/onnx/ directory
  3. Generate engines:
chmod +x generate_engines.sh
./generate_engines.sh onnx

[OK] when .engine files appear in the onnx/ directory. [STOP] if conversion fails.


Phase 6 — Camera calibration (optional but recommended)

Install calibration tools:

sudo apt install -y ros-humble-camera-calibration ros-${ROS_DISTRO}-v4l2-camera

Launch camera and calibrate:

# Terminal 1: launch camera
ros2 run v4l2_camera v4l2_camera_node --ros-args -p image_size:=[640,480] -p pixel_format:=YUYV

# Terminal 2: run calibration
ros2 run camera_calibration cameracalibrator \
  --size 8x6 --square 0.025 \
  --ros-args --remap image:=/image_raw --remap camera:=/v4l2_camera

Save calibration parameters to camera_info_example.yaml.

[OK] when calibration completes and parameters are saved.


Phase 7 — Run depth estimation (~1 min)

For USB camera:

CAMERA_INFO_FILE=camera_info_example.yaml ENABLE_UNDISTORTION=1 ./run_camera_depth.sh

For video file:

./run_video_depth.sh

[OK] when depth visualization appears.


Failure decision tree

SymptomAction
nvcc: command not foundCUDA not installed or not in PATH. Verify JetPack 6.2 installation, re-run Phase 2.
colcon build fails with missing dependencyInstall missing ROS2 or system package, then rebuild.
TensorRT engine generation failsCheck ONNX model is valid and placed in correct directory. Verify TensorRT is installed: dpkg -l | grep tensorrt.
No /dev/video* devices foundUSB camera not detected. Replug camera, check with lsusb and v4l2-ctl --list-devices.
ROS2 topic not publishingSource the workspace: source install/setup.bash. Check camera node is running.
OOM during engine generationClose other GPU processes. Engine generation for large models needs significant GPU memory.

Reference files

  • references/source.body.md — Full Seeed Wiki tutorial with screenshots, calibration details, and video demo links (reference only)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.