Skip to content

fix: use relative paths inside pip package (drop ../furniture_sim/ prefix) - #1

Merged
Vittorio-Caggiano merged 2 commits into
masterfrom
fix/pip-relative-paths
May 11, 2026
Merged

Vittorio-Caggiano merged 2 commits into
masterfrom
fix/pip-relative-paths

Conversation

@Vittorio-Caggiano

Copy link
Copy Markdown

Problem

All XML files reference assets via ../furniture_sim/X paths. When installed as a pip package, the sibling furniture_sim/ directory does not exist — MuJoCo cannot resolve these paths and asset loading fails at runtime.

Fix

Make paths relative to each file's actual location within the package:

File location Old pattern New pattern
Top-level *.xml ../furniture_sim/X X
Sub-directory */*.xml ../furniture_sim/X ../X
kitchen/*.xml ../../furniture_sim/X ../X

Impact

This is required for furniture_sim to work when installed via pip without a full git-submodule checkout. Without this fix, downstream consumers (e.g. MyoSuite) must apply runtime XML patching to rewrite these paths on every model load.

…efix)

All XML files referenced assets via ../furniture_sim/X paths. When
installed as a pip package the sibling furniture_sim/ directory does not
exist. Fix by making paths relative to each file's actual location:

- Top-level *.xml (e.g. bin.xml): ../furniture_sim/X → X
- Sub-directory */*.xml (e.g. bin/bin_asset.xml): ../furniture_sim/X → ../X
- kitchen/*.xml use ../../furniture_sim/X → ../X (two-level-up pattern)

Fixes path resolution when furniture_sim is imported from a virtual
environment without a git-submodule checkout of the full repo tree.
@Vittorio-Caggiano
Vittorio-Caggiano merged commit 774a9ab into master May 11, 2026
1 check passed
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