Fix star terrain generation with NumPy 2 - #7519
Conversation
Greptile SummaryThis PR restores star-terrain generation under NumPy 2 by replacing the removed
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness, compatibility, or security issues identified. The standard-library trigonometric functions accept the reachable scalar yaw values and preserve the prior calculations, while the new test executes all three modified branches. Important Files Changed
Reviews (1): Last reviewed commit: "Fix star terrain generation with NumPy 2" | Re-trigger Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
The PR applies the targeted NumPy 2 compatibility fix by replacing the removed np.math alias with the standard-library math module, with a collected regression test and package changelog fragment.
- Design and architecture: The change remains localized to
star_terrain()and adds no dependency or architectural boundary. Using the standard-librarymathmodule directly preserves the original scalar trigonometric implementation. - API: No public symbols, configuration fields, defaults, exports, or return types change. Existing callers retain the same terrain-generation contract, and the required changelog fragment is included for the touched package.
- Implementation: All three yaw branches now call
math.cosormath.sin, matching the module previously exposed throughnp.math. The five-bar test reaches each branch and verifies successful generation, finite vertices, and the expected origin. Its geometry assertions are intentionally broad, so it primarily protects against the reported generation failure rather than exact mesh-shape regressions.
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.
|
run-ci |
|
Closing in favor of #6910 |
Description
star_terrain()accessednp.math.cosandnp.math.sin, but NumPy 2 removed thenp.mathalias. Because Isaac Lab requires NumPy 2, everyMeshStarTerrainCfggeneration failed immediately withAttributeError.This change uses the standard-library
mathmodule that the old NumPy alias exposed, preserving the scalar geometry calculations.Fixes #6909
Type of change
Release backport
developScreenshots
Not applicable; this fixes a headless terrain-generation crash.
Validation
uv run isaaclab -f— all pre-commit hooks passed.Checklist
pre-commitchecks withuv run isaaclab -fsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.md