Back to Projects

Factory Twin

A Python pipeline that generates and validates USD digital-twin scenes of a factory line from YAML configs, packaged as an NVIDIA Omniverse Kit extension and run end-to-end through Azure DevOps

View Code

Technologies

PythonOpenUSDNVIDIA Omniverse KitAzure DevOpsCI/CDpytest

## Overview

Factory Twin turns a simple YAML description of a manufacturing line into a validated USD (Universal Scene Description) digital-twin scene, the same scene format NVIDIA Omniverse is built on. It is built on the open-source OpenUSD Python bindings, so it produces real, Omniverse-compatible scenes without needing a GPU. The same core is also wrapped as an Omniverse Kit extension, and the whole project runs through a full Azure DevOps workflow.

## Problem

A factory digital twin in Omniverse is fundamentally a USD scene. Building those scenes by hand is slow and error-prone, and a broken layout can silently propagate into downstream tooling. I wanted a config-driven way to generate clean scenes, catch bad layouts early, and prove the whole thing out with real CI and acceptance testing.

## Solution

The tool parses a YAML line description into plain data models, validates the layout, and only then builds the USD stage: a root transform with one geometry prim per component, scaled and positioned in metres and tagged with its type. If validation fails it raises instead of writing a broken scene. The same geometry-building function is reused by both the command-line generator and the Omniverse Kit extension, which injects the factory geometry into a live viewport stage.

## Features

- **Config-driven USD generation**: describe robots, conveyors, workstations, and fixtures in YAML, get a validated `.usda` scene
- **Scene validation**: catches overlapping geometry (axis-aligned bounding box test), duplicate prim names, unknown component types, and invalid dimensions
- **Omniverse Kit extension**: packages the same generator as an `omni.ext` extension that adds a menu command to build geometry into the current stage
- **Full Azure DevOps workflow**: Boards backlog, a CI pipeline (lint, a 9-case pytest suite, sample scene generation, artifact publishing) on a self-hosted agent, and an 8-case UAT test plan with a defect tracked from found to closed

## Technologies Used

- **Language**: Python
- **3D / Scene**: OpenUSD (usd-core), NVIDIA Omniverse Kit
- **DevOps**: Azure DevOps (Boards, Repos, Pipelines, Test Plans), CI/CD, pytest, ruff

## What I Learned

Working directly in the USD scene graph, designing a validator that reasons about geometry before anything is rendered, and running a project through the full plan, build, test, and acceptance loop in Azure DevOps rather than just writing code.