Skip to content

Add multi-asset loading with spacing in preview script#224

Merged
yuecideng merged 2 commits into
mainfrom
feat/multi-asset-preview-spacing
Apr 9, 2026
Merged

Add multi-asset loading with spacing in preview script#224
yuecideng merged 2 commits into
mainfrom
feat/multi-asset-preview-spacing

Conversation

@yuecideng
Copy link
Copy Markdown
Contributor

Description

This PR adds multi-asset support to the asset preview script.

It allows passing multiple paths to --asset_path and loads each asset with configurable relative spacing (default 1.0m) along +X from the provided initial position.

Dependencies: None

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which improves an existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • Documentation update

Screenshots

N/A

Checklist

  • I have run the black . command to format the code base.
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Dependencies have been updated, if applicable.

🤖 Generated with Claude Code

Allow --asset_path to accept multiple assets and add --asset_spacing\nfor 1m-relative placement between loaded assets.\n\nAlso update preview/main flow to handle a list of loaded\nassets and improve UID handling for multi-asset loads.\n\nCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 8, 2026 15:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for loading multiple assets in the preview_asset.py script by allowing multiple --asset_path values and spacing each asset along +X from the initial position.

Changes:

  • Rename single-asset loader to load_assets() and return a list of loaded assets.
  • Add --asset_spacing CLI argument and place assets at init_pos + (idx * spacing, 0, 0).
  • Update preview/main flow to work with multiple loaded assets.
Comments suppressed due to low confidence (1)

embodichain/lab/scripts/preview_asset.py:76

  • The load_assets() docstring claims that when --asset_type is not specified and the file is USD, the script will inspect the USD stage to auto-select between articulation vs rigid. In the current implementation asset_type is always taken from args.asset_type (defaulting to "rigid") except for the URDF override, so no USD auto-detection occurs. Please either implement the described USD inspection (likely requiring --asset_type defaulting to None so you can detect whether the user provided it) or update the docstring/CLI help to reflect the actual behavior.
    If ``--asset_type`` is not specified and the file is USD, the script will
    inspect the USD stage for articulation roots to decide between articulation
    and rigid object.  For non-USD files the default is always ``rigid``.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yuecideng yuecideng merged commit 7200c10 into main Apr 9, 2026
4 checks passed
@yuecideng yuecideng deleted the feat/multi-asset-preview-spacing branch April 9, 2026 02:28
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.

2 participants