Conversation
The package ships two unrelated halves: `robot_assets.loader`, a stdlib-only GitHub fetch/cache helper that runtime consumers use to pull descriptions, and `robot_assets.workflow`, the CAD -> URDF/MJCF/xacro generator. Both were covered by one hard dependency list, so anyone installing this for the loader also got mujoco, onshape-to-robot and pymeshlab -- none of which the loader imports. Move the three to a `cad` extra and leave the base install dependency-free. Deployment code that only calls `load()` now pulls in no simulator and no CAD toolchain; asset generation asks for `robot-assets[cad]`. MuJoCo here is the MJCF compiler rather than a simulator (urdf_to_mjcf.py goes through MjModel.from_xml_path / mj_saveLastXML), and pymeshlab is really onshape-to-robot's own extra, needed because every cad/config.json sets "simplify_stls": true -- both noted inline so the extra stays self-explaining. Guard the two entry points that need the toolchain so a base install fails with a message naming the extra instead of a bare ModuleNotFoundError, or an obscure subprocess failure for the onshape-to-robot CLI. The `test` group depends on `robot-assets[cad]`, so CI needs no change. Note for downstream: prime_description declares a plain `robot-assets` git dependency and relies on these three arriving transitively. It needs to move to `robot-assets[cad]` once this lands. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FwK47CB1Cdu2PEYtqt87Js
T-K-233
force-pushed
the
cad-extra
branch
2 times, most recently
from
August 20, 2026 18:47
0d8b9f5 to
f3b6899
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
robot-assetsships two unrelated halves in one distribution:robot_assets/loader.py— a stdlib-only GitHub ZIP fetch/cache helper (load("robots/lite/urdf/lite.urdf")), which is what runtime consumers wantrobot_assets/workflow/*— the CAD → URDF/MJCF/xacro generatorBoth were covered by one hard dependency list, so installing this package for the loader also pulled
mujoco,onshape-to-robotandpymeshlab— none of which the loader imports. A description package should be asset-generation tooling plus assets; deployment code consuming it shouldn't inherit a simulator.The ROS side was already clean (
package.xmlonlyexec_depends onxacro), so this only ever leaked through the Python wheel — but it leaked to exactly the consumers we care about.What
dependencies = []; the three move to[project.optional-dependencies] cadtestgroup depends onrobot-assets[cad], so CI needs no change — it already runsuv sync --group testurdf_to_mjcf.py'simport mujoco, and theonshape-to-robotCLI lookup inonshape_to_urdf.py(a subprocess, so a missing install would otherwise fail obscurely). Both now name the extra.uv sync --extra cadfor regeneration; noted the dependency-free base installOn the name: extras in the wild are nouns for the capability you're opting into (
mujocoitself shipssysid/usd), socadover a verb likegenerate. It also matches this repo's own vocabulary —robots/<robot>/cad/is exactly the directory holding the inputs these three deps consume.Two notes kept inline in the extra, since neither is obvious from the dep list:
urdf_to_mjcf.pyusesMjModel.from_xml_path+mj_saveLastXML. There's no standalone binding for it.pymeshlabis reallyonshape-to-robot[pymeshlab]— never imported by us, required because everycad/config.jsonsets"simplify_stls": true. Kept as an explicit pin to preserve the>=2025.7.post1floor.Downstream
prime_descriptiondeclares a plainrobot-assetsgit dependency, with a comment noting it "transitively provides mujoco / onshape-to-robot / pymeshlab" — which stops being true here. It importsrobot_assets.workflow, so it needsrobot-assets[cad] @ git+.... That change is prepared and must merge after this one, since the extra has to exist upstream first.The same change is up for Lite-Specialist-Description (T-K-233/Lite-Specialist-Description#1).
Verification
from robot_assets import loadworks in ituv sync --group testresolves the self-referential extra correctlypytest: 1569 passed, 6 skipped; flake8 clean on touched files (the one W503 inurdf_to_mjcf.pypredates this branch)🤖 Generated with Claude Code
https://claude.ai/code/session_01FwK47CB1Cdu2PEYtqt87Js