Generated banner for Foundationpose Setup
Generated logo for Foundationpose Setup

Foundationpose Setup

NVIDIAOfficialCreated by zwdoescodeDistributed by NVIDIA

  • Skill
  • Workflow
  • Software development
  • Apache-2.0
  • Medium risk

From the author

Install or repair the FoundationPose perception pipeline and build its FoundationStereo TensorRT engines. Use for SAM3/TAO dependency conflicts, CUDA library failures, and depth-engine shape or precision decisions.
— the description by zwdoescode

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured workflow for installing, configuring, and repairing the FoundationPose perception pipeline. It covers environment setup, dependency management for SAM3 and TAO, and the construction of FoundationStereo TensorRT engines. The skill ensures that the runtime environment meets strict hardware and software requirements, including specific glibc versions and CUDA toolkit configurations, while providing diagnostic steps for common library and engine-loading failures.

What it does

  • Performs preflight checks for system requirements like glibc, CUDA, and GPU access.
  • Installs and synchronizes the FoundationPose pipeline environment using uv.
  • Manages sibling dependencies including SAM3 and the FoundationPose inference library.
  • Builds optimized FoundationStereo TensorRT engines based on scene-specific shapes.
  • Verifies pipeline integrity through component-specific test scripts.
  • Troubleshoots common dependency conflicts and library loading errors.

When to use it

  • When performing an initial installation of the FoundationPose perception pipeline.
  • When encountering library loading errors such as missing libcudart.so or GLIBC version mismatches.
  • When needing to build or rebuild a TAO depth engine for a specific dataset or scene.
  • When resolving dependency conflicts between SAM3, TAO Deploy, and the pipeline environment.

Advantages

  • Ensures environment consistency by validating system-level requirements before installation.
  • Provides clear procedures for handling machine-specific engine builds.
  • Maintains clean separation between the pipeline, inference library, and model weights.
  • Offers targeted troubleshooting steps for common runtime and build-time failures.

Usage examples

“Install the FoundationPose perception pipeline on this Ubuntu 24.04 GPU machine.”
The agent will verify system requirements, set up the Python venv, clone necessary repositories, and run the installation sync.
“The pipeline cannot load libcudart.so.13 after I moved the checkout.”
The agent will inspect the current environment paths and library links to resolve the runtime loading error.
“Build the TAO depth engine for my adapted T-LESS scenes.”
The agent will guide the user through the engine construction process using the adapted scene data and appropriate precision settings.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/nvidia/foundationpose-setup/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip foundationpose-setup.zip -d .agents/skills

Documentation by zwdoescode

FoundationPose perception pipeline setup

Purpose

Prepare the FoundationPose perception pipeline for depth, segmentation, and pose inference. Environment installation and engine construction belong here; dataset adaptation, inference, and pose evaluation belong to foundationpose-pipeline when that skill is installed.

Requirements

Work from the product checkout, not the installed skill directory. Find the user's checkout by checking for pyproject.toml (project foundationpose-perception-pipeline), tools/build_tao_engine.py, and config/defaults.yaml. If absent and setup was requested, clone the product URL above into the user's workspace and enter it. For advice-only requests, use the supplied diagnostics without cloning or installing anything. Commands below use paths relative to the product root; references/ links are relative to this skill.

Read the checkout's README.md Requirements and Install sections for the matching revision. The supported stack requires Linux x86_64, glibc >= 2.38, GLIBCXX_3.4.31, NVIDIA driver >= 580, a CUDA toolkit >= 12.8 with nvcc, Python 3.12, uv, Git, Docker with GPU access, wget, and unzip. Start GPU sizing at 24 GB and measure the densest scene; 32 GB was tested. Budget depth-cache disk as roughly width * height * 4 * 3 bytes per scene, plus predictions and models.

Keep sibling directories for sam3/, foundation-pose-inference-library/, and models/ beside the product checkout. models/ contains the deployable ONNX and engine, not FoundationStereo source.

Instructions

  1. Preflight before installing. Check glibc, GLIBCXX, driver, nvcc, tools, and Docker GPU access. An Ubuntu 22.04 host with glibc 2.35 cannot load the shipped FoundationPose library; report the unsupported runtime and stop setup there. Do not replace system libc or try to solve this with LD_LIBRARY_PATH. See installation.

  2. Install into the product's Python 3.12 venv. Follow installation for uv, SAM3, the FoundationPose build, and TAO Deploy. On a fresh venv use uv sync --extra foundationpose; on an existing venv use uv sync --inexact --extra foundationpose to preserve out-of-band packages.

  3. Verify checkpoint access. SAM3 is gated at Hugging Face; an existing authorized token or usable cached checkpoint is sufficient. Request user action only if access is missing. FoundationPose and the documented FoundationStereo export are public Hugging Face downloads; credential hunting is not the first response to a network failure.

  4. Prepare the depth engine. Read engine construction. Use the user's ONNX location or the sibling models/ directory. Adapt the dataset before measuring the engine shape; use tools/bop_adapt/adapt.py --config <profile> --src <source> as described in the checkout's README Dataset adaptation section. Only registered adapters are supported. Build with --shape-from-scene on an adapted scene and FP32 unless the user requests a precision experiment. Set overrides.depth.engine in config/<profile>.yaml.

  5. Set runtime paths and verify. From the product root:

    source .venv/bin/activate
    export FOUNDATIONPOSE_ROOT="$(realpath ../foundation-pose-inference-library)"
    PIPELINE_SITE="$(realpath .venv/lib/python3.12/site-packages)"
    export LD_LIBRARY_PATH="${PIPELINE_SITE}/tensorrt_libs:${PIPELINE_SITE}/nvidia/cu13/lib:${LD_LIBRARY_PATH:-}"
    python tools/verify_sam3.py
    python tools/verify_foundationpose.py
    python tools/verify_foundationstereo.py --config <profile> --engine <engine-path>
    python test/check_engine_depth_smoke.py --config <profile> --engine <engine-path>

    The first three verify components; the last also needs an adapted dataset. Expect backend=tao, normalization=imagenet, the intended fixed shape, and no cropping N rows warning. An unloaded or unavailable engine is an incomplete verification, not a pass.

Troubleshooting

SymptomAction
GLIBC_2.38 not foundUse a supported OS/runtime; a venv or library search path cannot upgrade host libc.
libcudart.so.13 missingCheck the product venv runtime wheels and absolute library paths before retrying pose.
SAM3 breaks after syncUse --inexact; confirm numpy 1.26.x and reinstall the sibling SAM3 package if pruned.
pycuda build cannot find cuda.hCheck the CUDA toolkit, nvcc on PATH, or CUDA_ROOT.
TAO import or dependency conflictUse TAO Deploy 7.1.0 with --no-deps; sync declared dependencies with --inexact.
Engine sidecar mismatch or croppingRebuild for this GPU, TensorRT version, precision, and adapted scene shape.

Examples

  • "Install the FoundationPose perception pipeline on this Ubuntu 24.04 GPU machine."

  • "The pipeline cannot load libcudart.so.13 after I moved the checkout."

  • "Build the TAO depth engine for my adapted T-LESS scenes."

Limitations and completion

Engines are machine-specific and must not be committed. With no dataset, download the ONNX and report shape-dependent engine construction and scene validation as pending; do not invent a rig shape. The pipeline's Apache license does not cover separately downloaded model weights; retain their upstream terms and SAM3's access requirements.

Report which preflight, install, checkpoint, engine, and verification steps actually passed, the checkout and engine paths, versions used, and remaining blockers. Do not equate installation or a smoke check with measured pose accuracy.

Files

references/installation.md

Installation procedure

Commands run from the product checkout identified in SKILL.md. Consult that checkout's README.md and pyproject.toml if its revision differs from this procedure.

Preflight

ldd --version | head -1
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX_3.4.31
nvidia-smi
nvcc --version
uv --version
docker --version
git --version
command -v wget unzip
docker run --rm --gpus=all ubuntu:24.04 nvidia-smi

Require glibc >= 2.38 and GLIBCXX_3.4.31 before the expensive build; Ubuntu 24.04 meets this floor. A successful Docker build does not prove the resulting library can load on the host. Require driver >= 580 and the CUDA toolkit >= 12.8. The toolkit supplies headers and link libraries for pycuda's source build; pip runtime wheels alone are insufficient.

If GPU access fails, check the NVIDIA Container Toolkit installation guide. Docker socket access and GPU access are separate checks. Host package installation, daemon restarts, and Docker group changes require the user's normal administrative workflow; report what is missing when those privileges are unavailable. Newly granted group membership requires a new login/shell. Reuse tools and access already present.

Pipeline and SAM3

Capture absolute paths so subsequent directory changes do not change the venv target:

PIPELINE_ROOT="$PWD"
PIPELINE_PARENT="$(dirname "$PIPELINE_ROOT")"

For a new environment:

uv venv --python 3.12
uv sync --extra foundationpose

For an existing environment, preserve out-of-band SAM3, TAO Deploy, and pycuda:

uv sync --inexact --extra foundationpose

Reuse an existing sibling SAM3 checkout; otherwise:

git clone https://github.com/facebookresearch/sam3 "$PIPELINE_PARENT/sam3"

Install the sibling, not the unrelated package named sam3 on PyPI:

uv pip install --python "$PIPELINE_ROOT/.venv/bin/python" -e "$PIPELINE_PARENT/sam3"
"$PIPELINE_ROOT/.venv/bin/python" -c "import numpy, cv2, scipy; print(numpy.__version__, cv2.__version__, scipy.__version__)"

Expect numpy 1.26.x. If an out-of-band install changed it, restore the project's pins with uv sync --inexact --extra foundationpose from the product root. Preserve the setuptools < 81 pin: SAM3 imports pkg_resources.

The checkpoint is gated at facebook/sam3. Use existing access or a usable cached checkpoint. If access is missing, the user must request the model grant and authenticate with "$PIPELINE_ROOT/.venv/bin/hf" auth login in their shell. Do not print tokens. The hf executable arrives through SAM3's dependencies and may not be on PATH before venv activation.

FoundationPose build and weights

Reuse the sibling checkout if present; otherwise:

git clone https://github.com/nvidia-isaac/foundation-pose-inference-library.git \
  "$PIPELINE_PARENT/foundation-pose-inference-library"

Enter that checkout. Create .env from .env.example only if it does not exist; preserve any existing configuration. On a fresh setup set FP_UID and FP_GID to the current user's IDs. Keep FP_WEIGHTS_DIR=./weights unless using an intentional custom layout. The library's download script fetches the public ONNX weights from nvidia/foundationpose on Hugging Face:

cd "$PIPELINE_PARENT/foundation-pose-inference-library"
mkdir -p data weights engine_cache
./run_dev.sh build
./run_dev.sh run --rm build
scripts/download_weights.sh
cd "$PIPELINE_ROOT"
uv sync --inexact --extra foundationpose

Create bind-mount directories before running Docker so the daemon does not create root-owned ones. The downloader requires wget and unzip. The documented weights are public; on download failure inspect HTTP/network errors and retry a transient failure once before reporting it.

The pipeline does not read the library's .env. It looks under FOUNDATIONPOSE_ROOT for build/libfoundation_pose_nvidia.so, weights/refiner_net.onnx, and weights/score_net.onnx. If these move, use consistent --fp-library, --fp-refine-model-path, and --fp-score-model-path overrides. Changing FP_WEIGHTS_DIR alone does not update pipeline paths.

TAO Deploy

From the product root:

uv pip install --python .venv/bin/python --no-deps nvidia-tao-deploy==7.1.0
uv pip install --python .venv/bin/python pycuda

--no-deps is required for this stack: TAO's dependency pins conflict with SAM3's numpy < 2 requirement. Do not add a tao extra to the project; uv resolves even unselected extras and this conflict makes all syncs fail. The project's declared dependencies supply omegaconf and matplotlib; if absent, sync with --inexact --extra foundationpose rather than applying another ad-hoc install. Older TAO Deploy releases may lack the usable cv/depth_net configuration.

Runtime libraries

Set the absolute FOUNDATIONPOSE_ROOT and LD_LIBRARY_PATH from SKILL.md before checking:

ldd "$FOUNDATIONPOSE_ROOT/build/libfoundation_pose_nvidia.so"

There should be no not found entries. Locate missing NVIDIA runtime libraries in this venv's installed wheels. Non-NVIDIA dependencies may be system libraries; do not assume every missing library comes from a Python package. Never mix another venv's CUDA/cuDNN libraries into the path.

FOUNDATIONPOSE_ROOT is needed at import time; --foundationpose-root alone does not replace it. No PYTHONPATH modification is needed for the installed pipeline package.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python

Security

What our scanner noticed· Medium risk

  • Large base64-encoded blobs
  • Instructions that use the network

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
zwdoescode
Publisher
NVIDIA (Official)
Distributed by
NVIDIA
Source
NVIDIA/skills · skills/foundationpose-setup · commit fce3cca
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE-APACHE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by zwdoescode or NVIDIA.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download foundationpose-setup.zip