Ship the assets together in the lite_description package - #20
Merged
Merged
Conversation
T-K-233
force-pushed
the
ship-assets-in-package
branch
from
September 29, 2026 23:34
f18724f to
3914085
Compare
…ls them
A consumer reached the assets through robot_assets.load(), which downloaded
the default branch of this repository into a data/ directory relative to the
working directory and never refreshed it. The uv.lock of the consumer pinned
only the loader code, so two machines on the same commit could train on
different robot models. The lite_biped feet are one example: they went from
two box soles to eleven contact spheres, and a machine with an older cache
kept the boxes.
The assets now sit inside the Python package, at lite_description/robots/,
so the wheel carries them and the lock of the consumer pins them. This is
the layout of mjlab and specialist_description. The package returns paths
rather than loaded models:
from lite_description import get_mjcf_path, get_urdf_path
mujoco.MjModel.from_xml_path(str(get_mjcf_path("lite_biped")))
The functions carry a get_ prefix, because mjcf_path and urdf_path are the
names that callers, and this repository, give to the paths they return.
ROBOTS_DIR names that robots/ directory, and VARIANTS comes from it, so no
second list can drift. The wheel leaves cad/ out, and the ament install
leaves it out as before.
The generator stays in the package as lite_description.workflow, because
this repository owns the conversion logic. The CAD toolchain stays behind
the cad extra, so the base install has no dependencies. The commands are
renamed to lite-description-*, and the generator now resolves a variant
through the package. An installed package carries no cad/, so the
generator stops with an error there instead of writing into site-packages.
lite_description.actuators.func becomes lite_description.actuators.modeling.
Its functions take the armature and the effort limit as floats instead of a
whole spec table, so each signature names what the function reads. The
results do not change for any table in the package.
The distribution is renamed from robot-assets to lite-description, to match
the import name and the ament package. The version goes to 0.5.0, because
load() is removed and the actuators API changes.
The ament install destination does not change, so $(find lite_description)
and package://lite_description/robots/... resolve as before. Only the
banner line of each generated file changed, to name the new command. A
regeneration of all six variants with --only urdf,mjcf,xacro changes no
other line.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016v8yyJmNp67C8M5rMxHnKF
T-K-233
force-pushed
the
ship-assets-in-package
branch
from
September 29, 2026 23:47
3914085 to
5650787
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.
A consumer's lock did not pin the robot model
robot_assets.load()downloaded the default branch of this repository into adata/directory relative to the working directory, and never refreshed it. Theuv.lockof a consumer pinned only the loader code, so the model depended on when and where the cache was first made. Two machines on one commit oflite-motion-trackingcould train on different robots. Thelite_bipedfeet show the problem: sinceff02069, they went from two box soles to eleven contact spheres per foot, andankle_yawwent from ±45° to ±90°. A machine with an older cache kept the old model.The package now carries the assets
robots/moves tolite_description/robots/, inside the Python package, so the wheel carries the assets and a consumer's lock pins them. mjlab (mjlab/asset_zoo/robots/) andspecialist_descriptionuse the same layout. The module returns paths, not loaded models:The functions carry a
get_prefix, becausemjcf_pathandurdf_pathare the names that callers, and this repository in about ten places, give to the paths they return.mjcf_path = mjcf_path("lite")would fail withUnboundLocalErrorinside a function.ament_index_python.get_package_share_directory()uses the same form. specialist-ai/specialist_description#8 makes the same renames, so the two description packages keep one API.A URDF or MJCF reaches its meshes by a relative path, so a consumer loads the file where it lies.
ROBOTS_DIRnames thatrobots/directory, andVARIANTScomes from it, so no second list can drift. The plural keeps it apart fromrobot_dir, which names one variant's directory throughout the generator.test_package.pychecks it against the CMake list.The wheel is 30.5 MB, and leaves
cad/out.The generator stays in the package
This repository owns the conversion logic, so the generator stays importable as
lite_description.workflow. The CAD toolchain stays behind thecadextra, so a plain install has no dependencies.stretch_urdfand mjlab also ship their tools with their assets.robot-assets-*→lite-description-*.cad/, so the generator stops with an error there instead of writing intosite-packages.Breaking change for Python consumers
The distribution is renamed from
robot-assetstolite-description(0.5.0), to match the import name and the ament package.load()is gone:lite_description.actuators.funcbecomeslite_description.actuators.modeling. Its functions take the armature and the effort limit as floats instead of a whole spec table, so each signature names what the function reads. The results do not change for any of the 15 tables in the package.lite-motion-trackingmoves in berkeley-humanoids/lite-motion-tracking#4.Lite-RL-Finetuneand any other code that importsrobot_assetsmust move too.Nothing changes for ROS
share/lite_description/robots/<variant>/, so$(find lite_description)andpackage://URLs resolve as before.--only urdf,mjcf,xacro,packagechanges no other line.package.xmlstays at 0.0.2.Verification
uv run pytest: 1590 passed, 36 skipped.ament_cmake, gives the same tree as before and contains nocad/. All 24 assembly and backend pairs of the CI job expand withxacroagainst that tree. There was no ROS install, so thecolconjob in CI is the first real build.🤖 Generated with Claude Code
https://claude.ai/code/session_016v8yyJmNp67C8M5rMxHnKF