fix simready error#299
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the simready pipeline to (1) improve upright-orientation handling in process_mesh() by selecting among 0°/90°/180°/270° rotations, and (2) switch the default ingest mesh backend from blender to trimesh via configuration.
Changes:
- Updated
process_mesh()upright-orientation logic to generate 3 additional rotated renders and ask the LLM to select the best upright index. - Updated
gen_config.jsonto setingest.source_preparation.modedefault totrimeshinstead ofblender.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
embodichain/gen_sim/simready_pipeline/utils/simready_utils.py |
Changes upright-orientation selection to use 4-way rotation classification and applies corresponding mesh rotations. |
embodichain/gen_sim/simready_pipeline/configs/gen_config.json |
Switches default source preparation backend from Blender to Trimesh. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1065
to
+1080
| side_rotation_result = ask_llm_upright_rotation(object_name, rotated_imgs) | ||
| side_rotation_result = side_rotation_result.get("upright_index", 0) | ||
| print("side rotation is", side_rotation_result) | ||
| if side_rotation_result == 0: | ||
| pass | ||
| elif side_rotation_result == 1: | ||
| side_r = rot_x(90) | ||
| apply_rotations(mesh, side_r) | ||
| elif side_rotation_result == 2: | ||
| side_r = rot_x(180) | ||
| apply_rotations(mesh, side_r) | ||
| elif side_rotation_result == 3: | ||
| side_r = rot_x(270) | ||
| apply_rotations(mesh, side_r) | ||
| else: | ||
| raise ValueError("no upright index choosen") |
Comment on lines
+1059
to
1063
| flipped_path = str( | ||
| Path(upright_img).with_name( | ||
| Path(upright_img).stem + f"_{deg}_flipped.png" | ||
| ) | ||
| ) |
yuecideng
pushed a commit
that referenced
this pull request
Jun 15, 2026
Co-authored-by: weiyanjun <weiyanjun@dexforce.top>
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.
Description
This PR fixes an error in the simready pipeline and replaces the blender backend with trimesh as the default mesh processor.
Changes included:
simready_utils.pythat caused the pipeline to fail under certain conditions (e.g., when processing specific mesh formats).gen_config.json: changed the default mesh backend fromblendertotrimesh. This improves dependency management and processing speed, as trimesh is lighter and more Python-native.Motivation & context:
The previous simready pipeline occasionally crashed due to an unhandled edge case. Additionally, using blender as a mesh backend introduced heavy external dependencies and slower performance. Switching to trimesh provides a more reliable and efficient solution without breaking existing functionality.
No new dependencies are introduced – trimesh is already available in the environment.
Fixes # (no open issue, but resolves a runtime error observed during testing)
Type of change
Screenshots
Not applicable (code and configuration changes only).
Checklist
black .command to format the code base.