Skip to content

fix simready error#299

Merged
yanjunyanjunyanjun merged 1 commit into
mainfrom
yanjun/fix-simready-error
Jun 12, 2026
Merged

fix simready error#299
yanjunyanjunyanjun merged 1 commit into
mainfrom
yanjun/fix-simready-error

Conversation

@yanjunyanjunyanjun

Copy link
Copy Markdown
Collaborator

Description

This PR fixes an error in the simready pipeline and replaces the blender backend with trimesh as the default mesh processor.

Changes included:

  • Fixed an issue in simready_utils.py that caused the pipeline to fail under certain conditions (e.g., when processing specific mesh formats).
  • Updated gen_config.json: changed the default mesh backend from blender to trimesh. 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

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which improves an existing functionality)

Screenshots

Not applicable (code and configuration changes only).

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.

Copilot AI review requested due to automatic review settings June 12, 2026 02:19
@yanjunyanjunyanjun yanjunyanjunyanjun merged commit f42a343 into main Jun 12, 2026
2 checks passed
@yanjunyanjunyanjun yanjunyanjunyanjun deleted the yanjun/fix-simready-error branch June 12, 2026 02:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.json to set ingest.source_preparation.mode default to trimesh instead of blender.

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>
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