Skip to content

Conversation

RyanCheddar
Copy link

Geom names with odd slash placement (e.g. "robot//arm") are valid in mujoco and in the XML format, but are not valid in the USD format and will cause the exporter to crash with an invalid path error.

Error in 'pxrInternal_v0_25_5__pxrReserved__::UsdStage::_IsValidPathForCreatingPrim' at line 3771 in file /Users/runner/work/OpenUSD/OpenUSD/pxr/usd/usd/stage.cpp : 'Path must be an absolute path: <>'

This PR adds a regex substitution to the exporter to get rid of leading/trailing/duplicate slashes in geom names.

Has the possible edge case of geoms vanishing from the final usd file if two separate geoms use the same name with extra slashes (e.g. "robot/box" and "robot//box"), which render as separate geoms in mujoco.

Copy link

google-cla bot commented Jul 9, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant