Skip to content

Commit db5c38f

Browse files
Update to 0.1.0a1 for release (#48)
Since its a non-compiled project, we don't need a matrix of builds. So we now - Build on Ubuntu - Test on Ubuntu (x64 & arm) and Windows - Deploy to PyPi for tags only Also updated to usd-exchange 2.2.0 Fixes #41
2 parents 04a75f1 + 2081fa7 commit db5c38f

File tree

9 files changed

+131
-213
lines changed

9 files changed

+131
-213
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
pull-requests: write # Required to comment on PRs
1414

1515
jobs:
16-
check-code-format:
16+
lint:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout repository
@@ -29,15 +29,7 @@ jobs:
2929
run: uv run --group dev poe lint
3030

3131
build:
32-
strategy:
33-
matrix:
34-
os:
35-
[
36-
ubuntu-latest,
37-
ubuntu-24.04-arm,
38-
windows-latest,
39-
]
40-
runs-on: ${{ matrix.os }}
32+
runs-on: ubuntu-latest
4133
steps:
4234
- name: Checkout repository
4335
uses: actions/checkout@v4
@@ -57,7 +49,7 @@ jobs:
5749
- name: Upload artifacts
5850
uses: actions/upload-artifact@v4
5951
with:
60-
name: urdf-usd-converter-dist-${{ matrix.os }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
52+
name: urdf-usd-converter-dist-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
6153
path: dist/
6254

6355
test:
@@ -81,7 +73,7 @@ jobs:
8173
- name: Download artifacts
8274
uses: actions/download-artifact@v4
8375
with:
84-
name: urdf-usd-converter-dist-${{ matrix.os }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
76+
name: urdf-usd-converter-dist-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
8577
path: dist/
8678

8779
- name: Run tests
@@ -133,7 +125,7 @@ jobs:
133125
- name: Download artifacts
134126
uses: actions/download-artifact@v4
135127
with:
136-
name: urdf-usd-converter-dist-${{ matrix.os }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
128+
name: urdf-usd-converter-dist-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
137129
path: dist/
138130

139131
- name: Test wheel installation (Linux)
@@ -165,3 +157,24 @@ jobs:
165157
# Test conversion
166158
New-Item -ItemType Directory -Force -Path test_outputs
167159
urdf_usd_converter -h
160+
161+
deploy:
162+
if: startsWith(github.ref, 'refs/tags/')
163+
needs:
164+
- build
165+
- test
166+
- test-package
167+
runs-on: ubuntu-latest
168+
environment:
169+
name: pypi
170+
url: https://pypi.org/p/urdf-usd-converter
171+
permissions:
172+
id-token: write
173+
steps:
174+
- name: Download wheel and source tarball
175+
uses: actions/download-artifact@v4
176+
with:
177+
name: urdf-usd-converter-dist-${{ github.ref_name }}
178+
path: dist/
179+
- name: Publish distribution to PyPI
180+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc

.gitlab/.gitlab-ci.yml

Lines changed: 0 additions & 121 deletions
This file was deleted.

.gitlab/CODEOWNERS

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitlab/templates.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,85 @@
1-
# 0.1.0dev0
1+
# 0.1.0a1
2+
3+
## Features
4+
5+
- **USD Asset Structure**
6+
- Output Assets are completely standalone with no dependencies on the source URDF, OBJ, DAE, or STL files
7+
- Atomic Component structure with Asset Interface layer and payloaded contents
8+
- Separate geometry, material, and physics content layers for easy asset-reuse across domains
9+
- Library-based asset references for meshes and materials to avoid heavy data duplication
10+
- Explicit USD stage metadata with units (meters, kilograms) and up-axis (Z)
11+
- **Link Conversion**
12+
- URDF links are converted as `UsdGeom.Xform` prims with `UsdPhysics.RigidBodyAPI` applied
13+
- The root link has `UsdPhysics.ArticulationRootAPI` applied to indicate the root of the kinematic tree
14+
- Links are nested in USD, reflecting the kinematic hierarchy of the source URDF rather than the XML file structure
15+
- Complete mass properties including explicit inertia & center of mass via `UsdPhysics.MassAPI`
16+
- **Joint Conversion**
17+
- Revolute joints as `UsdPhysics.RevoluteJoint` with angular limits
18+
- Continuous joints as `UsdPhysics.RevoluteJoint` without limits
19+
- Prismatic joints as `UsdPhysics.PrismaticJoint` with linear limits
20+
- Fixed joints as `UsdPhysics.FixedJoint`
21+
- Planar joints as `UsdPhysics.Joint` with the appropriate `UsdPhysics.LimitAPI` applied to constrain the locked DOFs
22+
- Floating joints (bodies are free by default in USD)
23+
- All joints have automatic joint frame alignment between Body0 and Body1, accounting for URDF joint axis, position, and orientation.
24+
- Joint limits for velocity & effort have no equivalent in `UsdPhysics`, but are authored as custom attributes `urdf:limit:velocity` and `urdf:limit:effort` respectively.
25+
- **Geometry Conversion**
26+
- All visual and collision geometry is converted to USD
27+
- Visuals are set with `default` UsdPurpose and colliders with `guide` UsdPurpose
28+
- `UsdPhysics.CollisionAPI` is applied to colliders
29+
- Meshes as `UsdGeom.Mesh`
30+
- Automatic mesh library generation with reference-based asset structure, to avoid duplicate topology
31+
- STL files converted to USD using `numpy-stl` and `usd-exchange` with normal processing
32+
- OBJ files converted using `tinyobjloader` and `usd-exchange` with UV coordinates and normal mapping
33+
- DAE files converted using `pycollada` and `usd-exchange` with UV coordinates, normal mapping, and `UsdGeom.Subset` support
34+
- OBJ and DAE files specifying multiple meshes convert as a list of meshes under a common parent prim
35+
- `UsdPhysics.MeshCollisionAPI` is applied to mesh colliders with convex hull specified as the approximation preference
36+
- Spheres as `UsdGeom.Sphere`
37+
- Boxes as `UsdGeom.Cube` with scale transforms
38+
- Cylinders as `UsdGeom.Cylinder`
39+
- **Visual Material and Texture Conversion**
40+
- All materials are converted to `UsdShade.Material` graphs using `UsdPreviewSurface` shaders, and encapsulated as instanceable material interfaces
41+
- PNG texture support with automatic texture copying and path resolution
42+
- URDF materials convert rgba as diffuse color and opacity, with support for diffuse textures
43+
- OBJ embedded materials (MTL files) convert diffuse color, specular color, dissolve (opacity), roughness (not shininess), metallic, and ior
44+
- diffuse, specular, normal/bump, roughness, metallic, and opacity textures are all supported
45+
- **Prim Naming**
46+
- If URDF/DAE/OBJ names are not valid USD specifiers they are automatically transcoded & made unique & valid
47+
- Display name metadata preserves the original source names on the USD Prims
48+
- **Command Line Interface**
49+
- Input is an URDF file and default output is a USD Layer as a structured Atomic Component with an Asset Interface USDA layer
50+
- All heavy data is compressed binary data (via USDC layers) while lightweight data is plain text for legibility
51+
- Optional comment string embedded into all authored USD Layers
52+
- Optional Stage flattening for single-file output
53+
- Optionally skip the `UsdPhysics.Scene` (this may be desirable for multi-asset setups)
54+
- Error handling with graceful failures
55+
- Enable verbose output for debugging (exposes any traceback info)
56+
- **Python API**
57+
- Full programmatic access via `urdf_usd_converter.Converter` class with configurable parameters for all CLI flags
58+
- Enables interactive editing of the USD Layers after conversion
59+
60+
# Known Limitations
61+
62+
## USD Data Conversion
63+
64+
- **Joint Conversion**
65+
- Calibration has no equivalent in `UsdPhysics` and is omitted
66+
- Dynamics has no equivalent in `UsdPhysics` and is omitted
67+
- Safety Controller has no equivalent in `UsdPhysics` and is omitted
68+
- Mimic has no equivalent in `UsdPhysics` and is omitted
69+
- **Geometry Conversion**
70+
- No other file formats beyond OBJ/DAE/STL are supported
71+
- For DAE files, only "TriangleSet", "Triangles", "Polylist", and "Polygons" are supported
72+
- For OBJ files, only objects with faces are supported (i.e. no points, lines, or free-form curves/surfaces)
73+
- **Visual Material and Texture Conversion**
74+
- DAE embedded materials are not implemented
75+
- Projection shaders for basic geometry primitives (box, cylinder, sphere) are not implemented
76+
- More accurate PBR materials (e.g. OpenPBR via UsdMtlx) are not implemented
77+
- **Other Elements**
78+
- Transmission conversion is not implemented
79+
- Gazebo conversion is not implemented
80+
- Conversion of other out-of-spec URDF extensions are not implemented
81+
82+
## Using the USD Asset in other USD Ecosystem applications
83+
84+
- The USD Asset contains nested rigid bodies within articulations.
85+
- Support for nested bodies in UsdPhysics is fairly new (as of USD 25.11), and some existing applications may not support this style of nesting.

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Key Features:
1010
- Converts an input URDF file into an OpenUSD Layer
1111
- Supports data conversion of visual geometry & materials, as well as the links, collision geometry, and joints necessary for kinematic simulation.
1212
- Available as a python module or command line interface (CLI).
13-
- Creates a standalone, self-contained artifact with no connection to the source URDF, OBJ, or STL data.
13+
- Creates a standalone, self-contained artifact with no connection to the source URDF, OBJ, DAE, or STL data.
1414
- Structured as an [Atomic Component](https://docs.omniverse.nvidia.com/usd/latest/learn-openusd/independent/asset-structure-principles.html#atomic-model-structure-flowerpot)
1515
- Suitable for visualization & rendering in any OpenUSD Ecosystem application.
1616
- Suitable for import & simulation in [Newton](https://github.com/newton-physics/newton).
@@ -26,6 +26,7 @@ The output asset structure is based on NVIDIA's [Principles of Scalable Asset St
2626
The implementation also leverages the following dependencies:
2727
- NVIDIA's [OpenUSD Exchange SDK](https://docs.omniverse.nvidia.com/usd/code-docs/usd-exchange-sdk/latest/index.html) to author consistent & correct USD data.
2828
- Pixar's OpenUSD python modules & native libraries (vendored via the `usd-exchange` wheel).
29+
- [tinyobjloader](https://github.com/tinyobjloader/tinyobjloader), [pycollada](https://github.com/pycollada/pycollada), and [numpy-stl](https://numpy-stl.readthedocs.io) for parsing any mesh data referenced by the input URDF datasets.
2930

3031
# Get Started
3132

@@ -64,7 +65,9 @@ We recommend starting with [usdview](https://docs.omniverse.nvidia.com/usd/lates
6465
6566
However, you cannot start simulating in usdview, as there is no native simulation engine in this application.
6667

67-
To simulate this asset directly, the best application is ...
68+
To simulate this asset in Newton, call [newton.ModelBuilder.add_usd()](https://newton-physics.github.io/newton/api/_generated/newton.ModelBuilder.html#newton.ModelBuilder.add_usd) to parse the asset and add it to your Newton model.
69+
70+
Simulating in other UsdPhysics enabled products (e.g. NVIDIA Omniverse, Unreal Engine, etc) may provided mixed results. The rigid bodies are structured hierarchically, which maximal coordinate solvers often do not support. In order to see faithful simulation in these applications, the USD asset will need to be modified to suit the expectations of each target runtime.
6871

6972
# Contribution Guidelines
7073

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
name = "urdf-usd-converter"
33
dynamic = ["version"]
44
description = "A URDF to OpenUSD Data Converter"
5-
authors = [{name = "NVIDIA"}]
5+
authors = [{ name = "Newton Developers" }]
66
license = {text = "Apache-2.0"}
77
readme = "README.md"
88
requires-python = ">=3.10,<3.13"
99
dependencies = [
10-
"usd-exchange>=2.2.0rc2", # locked to USD 25.05
10+
"usd-exchange>=2.2.0",
1111
"numpy-stl>=3.2",
1212
"tinyobjloader>=2.0.0rc13",
1313
"pycollada>=0.9.2",

urdf_usd_converter/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025 The Newton Developers
22
# SPDX-License-Identifier: Apache-2.0
3-
__version__ = "0.1.0dev0"
3+
__version__ = "0.1.0a1"

0 commit comments

Comments
 (0)