Skip to content

Honor USD cone axis during trimesh conversion - #7276

Open
sylvesterkaczmarek wants to merge 3 commits into
isaac-sim:developfrom
sylvesterkaczmarek:fix/cone-primitive-axis
Open

Honor USD cone axis during trimesh conversion#7276
sylvesterkaczmarek wants to merge 3 commits into
isaac-sim:developfrom
sylvesterkaczmarek:fix/cone-primitive-axis

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Description

Fixes trimesh conversion of USD Cone primitives with axis="X" or axis="Y".

create_trimesh_from_geom_shape() already respects the configured axis for cylinders and capsules, but _create_cone_trimesh() always returned the default Z-axis trimesh cone. As a result, X/Y-aligned USD cones were converted with the wrong geometry orientation.

USD defines a cone as centered at the origin with its apex pointing along the positive configured axis. The converter now rotates the centered trimesh cone so the apex points along +X or +Y when requested, while leaving the default Z behavior unchanged.

Type of change

  • Bug fix

Validation

  • Added unit regression coverage for X, Y, and Z cone axes.
  • Tests verify the apex lies on the positive configured axis and the base plane lies at the negative half-height.
  • No simulator launch is required for the regression test.
  • Added the required isaaclab changelog fragment.

Checklist

  • I have read and understood the contribution guidelines
  • I have added regression tests
  • I have added the required changelog fragment
  • No new dependencies

@sylvesterkaczmarek
sylvesterkaczmarek requested a review from a team August 21, 2026 15:53
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Aug 21, 2026

@isaaclab-review-bot isaaclab-review-bot Bot 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.

Isaac Lab Review Bot

The cone converter now honors USD X/Y axes while preserving Z-axis behavior, with focused regression coverage and a package changelog fragment.

  • Design and architecture: The change remains localized to the private cone converter and follows the established axis-transform pattern used by the cylinder and capsule converters; registry and dispatch architecture are unchanged.
  • API: No public symbols, signatures, exports, or return types change. The observable correction is limited to the orientation of converted X/Y-axis USD cones, while Z-axis conversion remains unchanged.
  • Implementation: The rotations correctly map the centered cone’s +Z apex to +X or +Y, and the parameterized test verifies apex direction and base position for all three supported axes. The differing rotation signs from symmetric cylinders and capsules are intentional because cone direction is observable.

No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.

Automated review; human maintainers own approval decisions.

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR fixes USD cone-to-trimesh conversion by rotating centered cones from trimesh’s default +Z orientation onto the configured USD X or Y axis.

  • Preserves the existing Z-axis behavior.
  • Adds kitless regression coverage for X, Y, and Z apex direction and extent.
  • Adds the required changelog fragment.

Confidence Score: 5/5

The PR appears safe to merge, with the cone-axis rotations consistent with USD and existing primitive-conversion conventions.

The new transforms map the centered trimesh cone’s positive Z apex to the requested positive X or Y axis, leave Z unchanged, and are exercised by focused regression tests without introducing a build, runtime, or security failure.

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/utils/mesh.py Reads the cone axis and applies rotations that correctly map the +Z apex to +X or +Y.
source/isaaclab/test/utils/test_mesh_cone_axis.py Adds focused unit coverage for cone orientation and half-height extents across all supported axes.
source/isaaclab/changelog.d/sylvesterkaczmarek-cone-primitive-axis.patch.rst Accurately documents the corrected X/Y cone conversion behavior.

Reviews (1): Last reviewed commit: "Honor USD cone axis during trimesh conve..." | Re-trigger Greptile

@AntoineRichard AntoineRichard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

AI review disclosure: This review was produced with assistance from multiple AI systems.

Thank you for putting this PR together.

Assessment: X and Y rotations map the +Z cone apex to the configured positive USD axis and preserve Z behavior.

Findings: Invalid .patch.rst changelog filename.

Requested changes: Rename the changelog fragment to .rst.

Changelog filename: Rename the current <slug>.patch.rst fragment to <slug>.rst for this patch-level change. IsaacLab accepts <slug>.rst (patch), <slug>.minor.rst, and <slug>.major.rst; it does not accept a .patch.rst suffix.

Test scope: One X/Y/Z regression covering apex direction and extrema is sufficient.

Documentation / AI skills: No additional documentation update is required: no public API change. No AI-skill update is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants