Repository navigation
Fix ray mesh triangulation and query shape validation - #8781
Conversation
|
run-ci |
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryThis PR triangulates USD faces before building single-mesh ray-cast meshes and moves non-camera ray ranges into
Review checks were static; no tests were run. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[USD face indices and counts] --> B[convert_faces_to_triangles]
B --> C[Warp mesh]
C --> D[Single-mesh query]
D --> G[RayCasterData.ray_distances]
E[Multi-mesh query] --> G
F[Newton query] --> G
D --> H[ray_hits_w]
H --> I[Existing post-hit height bias]
Reviews (1) · Last reviewed commit: "Share ray ranges and triangulate USD ray..." · Reviewed by Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Style consistency (1), Test quality (2). Other reviewed categories look good.
- PR description: The body matches production scope, but validation omits commands and the diff also changes test device selection; list exact pytest invocations and mention that test-only switch.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: Implementation looks good.
- Style consistency: The camera initialization comment drops the skipped-MRO buffer-mirroring invariant, making future parent buffer additions easy to miss; restore that constraint.
- Test quality: Added tests include cases without distinct observable contracts; delete the private-name source greps and collapse shape parameters to distinct layout behaviors.
Minor fixes needed. Posted 3 inline findings.
Automated review; human maintainers own approval decisions.
| # - MultiMeshRayCaster creates _ray_distance_wp / _ray_mesh_id_wp for multi-mesh use | ||
| # The camera replaces all of these with its own camera-named equivalents below. | ||
| # If either parent class gains new shared buffers, they must be added here explicitly. | ||
| # CameraData owns image outputs; initialize its raw ray buffers directly for projection into those images. |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Restore skipped-MRO invariant in comment
The replacement drops the invariant that this override deliberately skips super() and must mirror any buffer the parents allocate; restate that constraint instead of only naming CameraData ownership.
| ) | ||
|
|
||
|
|
||
| @pytest.mark.parametrize( |
There was a problem hiding this comment.
🟡 Warning · Test Quality — Collapse redundant parametrize rows
All four direction_shape rows trip the same shape-equality branch, and the three non-scalar leading_shape rows share one flatten/reshape path; keep one row from each matrix.
| for path in (root, consumers[0]): | ||
| for node in ast.walk(ast.parse(path.read_text())): | ||
| if isinstance(node, ast.Attribute): | ||
| assert node.attr not in {"_dummy_ray_distance", "_ray_distance_wp", "_dummy_normal_wp"}, path |
There was a problem hiding this comment.
🟡 Warning · Test Quality — Source greps assert removed private names
These AST walks only assert that removed private buffer names and a deleted kernel are absent; they break on any rename and duplicate no contract. Delete lines 87-103; the new range tests cover the behavior.
|
run-ci |
|
run-ci |
Description
USD polygon indices were passed directly to Warp as triangle indices, creating artificial interior faces. Triangulate them with the existing mesh utility before building the ray-caster mesh. A closed six-quad box now reports its outer surface correctly.
Validate identical
(..., 3)ray-start and direction shapes before flattening so mismatched arrays cannot reach the native query. This includes the remaining direction-shape validation from #7034; its output-reshape fix and #2416 are already covered on main.Fixes #3013
The shared distance-output proposal #2946 remains open. Existing
raycast_mesh(..., return_distance=True)and Newton'sray_distancesoutput remain available. This PR adds no sensor output or buffer and makes no drift-semantics changes (#4333). It is independent of #8780.Type of change
Validation
Checklist
uv run isaaclab --format.CONTRIBUTORS.md.