Remove ShapeMaterials, ShapeGeometry structs#492
Conversation
📝 WalkthroughWalkthroughThis change removes the Changes
Sequence Diagram(s)sequenceDiagram
participant Builder
participant Model
participant Solver
Builder->>Model: finalize() (provides shape_type, shape_scale, shape_src, ... as arrays)
Solver->>Model: Accesses shape_material_mu, shape_material_ke, ... directly
Model->>Solver: Provides flat arrays for all shape geometry/material properties
Solver->>Solver: Passes arrays to kernels instead of structured types
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Suggested reviewers
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
newton/solvers/mujoco/solver_mujoco.py (1)
1651-1652: Consider variable naming consistency.The attribute
model.shape_scaleis being assigned to a variable namedshape_size. While the logic is correct, consider using consistent naming eithershape_scalefor both orshape_sizefor both to improve code clarity.newton/utils/render.py (1)
338-365: Doc-string still speaks of geometry, not shapeNow that the API was flattened, each parameter represents a shape property, not a geometry property. The doc-string paragraphs (
shape_type,shape_scale,shape_thickness,shape_is_solid) still contain phrases like “each shape's geometry”. This is minor, but it can trip up users scanning the documentation for the new API.- shape_type (numpy.ndarray): Type of each shape's geometry. - shape_scale (numpy.ndarray): Scale of each shape's geometry. - shape_thickness (numpy.ndarray): Thickness of each shape's geometry. - shape_is_solid (numpy.ndarray): Solid flag for each shape's geometry. + shape_type (numpy.ndarray): Type of each shape. + shape_scale (numpy.ndarray): Per–shape scaling factors. + shape_thickness (numpy.ndarray): Per–shape shell thickness. + shape_is_solid (numpy.ndarray): Whether a shape is rendered as a closed solid.
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
docs/api/_generated/newton.sim.ShapeGeometry.rstis excluded by!**/_generated/**docs/api/_generated/newton.sim.ShapeMaterials.rstis excluded by!**/_generated/**
📒 Files selected for processing (29)
docs/api/newton_sim.rst(0 hunks)newton/__init__.py(0 hunks)newton/examples/example_anymal_c_walk_on_sand.py(1 hunks)newton/examples/example_mujoco.py(1 hunks)newton/examples/example_selection_materials.py(1 hunks)newton/sim/__init__.py(0 hunks)newton/sim/builder.py(14 hunks)newton/sim/collide.py(4 hunks)newton/sim/flags.py(1 hunks)newton/sim/model.py(2 hunks)newton/sim/types.py(0 hunks)newton/solvers/euler/kernels.py(6 hunks)newton/solvers/featherstone/solver_featherstone.py(1 hunks)newton/solvers/mujoco/solver_mujoco.py(5 hunks)newton/solvers/style3d/kernels.py(2 hunks)newton/solvers/style3d/solver_style3d.py(1 hunks)newton/solvers/vbd/solver_vbd.py(8 hunks)newton/solvers/xpbd/kernels.py(7 hunks)newton/solvers/xpbd/solver_xpbd.py(3 hunks)newton/tests/test_import_mjcf.py(1 hunks)newton/tests/test_import_urdf.py(2 hunks)newton/tests/test_import_usd.py(1 hunks)newton/tests/test_model.py(1 hunks)newton/tests/test_mujoco_solver.py(4 hunks)newton/utils/import_mjcf.py(2 hunks)newton/utils/import_urdf.py(2 hunks)newton/utils/recorder.py(2 hunks)newton/utils/render.py(5 hunks)newton/utils/selection.py(1 hunks)
💤 Files with no reviewable changes (4)
- newton/init.py
- docs/api/newton_sim.rst
- newton/sim/init.py
- newton/sim/types.py
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: in warp benchmarks, explicit wp.init() calls are not needed in most circumstances since the first wa...
Learnt from: shi-eric
PR: newton-physics/newton#461
File: asv/benchmarks/envs/example_humanoid.py:40-41
Timestamp: 2025-07-23T14:36:42.182Z
Learning: In Warp benchmarks, explicit wp.init() calls are not needed in most circumstances since the first Warp API call that requires initialization will automatically call wp.init(). Explicit wp.init() in setup() methods is helpful when the ASV benchmark is measuring a Warp API call, as wp.init() has non-trivial overhead that should be excluded from the benchmark timing.
Applied to files:
newton/solvers/style3d/kernels.py
📚 Learning: in the newton physics engine codebase, it's acceptable to test private api functions (those prefixed...
Learnt from: dylanturpin
PR: newton-physics/newton#394
File: newton/tests/test_ik.py:119-119
Timestamp: 2025-07-15T21:00:03.709Z
Learning: In the Newton physics engine codebase, it's acceptable to test private API functions (those prefixed with underscore) in unit and component tests, as the maintainers consider this appropriate for testing internal functionality.
Applied to files:
newton/tests/test_import_usd.py
📚 Learning: the use_mujoco option in newton/examples/example_mujoco.py is currently unsupported and causes crash...
Learnt from: Kenny-Vilella
PR: newton-physics/newton#398
File: newton/examples/example_mujoco.py:352-352
Timestamp: 2025-07-14T03:57:29.670Z
Learning: The use_mujoco option in newton/examples/example_mujoco.py is currently unsupported and causes crashes. The code automatically disables this option with a warning message when users attempt to enable it. This is intentionally kept as a placeholder for future implementation.
Applied to files:
newton/examples/example_mujoco.py
🧬 Code Graph Analysis (4)
newton/tests/test_model.py (2)
newton/tests/unittest_utils.py (1)
assert_np_equal(240-246)newton/tests/test_import_usd.py (1)
npsorted(223-224)
newton/examples/example_selection_materials.py (1)
newton/utils/selection.py (2)
get_attribute(544-555)set_attribute(557-572)
newton/tests/test_mujoco_solver.py (1)
newton/sim/builder.py (1)
shape_count(460-461)
newton/examples/example_mujoco.py (1)
newton/geometry/utils.py (1)
remesh_mesh(471-498)
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Run GPU Unit Tests on AWS EC2 (Pull Request)
- GitHub Check: Run GPU Benchmarks (Pull Request)
🔇 Additional comments (62)
newton/utils/selection.py (1)
450-450: LGTM! Comment correctly updated to reflect new attribute naming.The comment example has been properly updated from the old structured attribute format (
"shape_materials.mu") to the new flat array format ("shape_material_mu"), which aligns with the removal ofShapeMaterialsstructs throughout the codebase.newton/utils/import_urdf.py (1)
251-251: LGTM! Attribute names correctly updated for consistency.The changes from
builder.shape_geo_typetobuilder.shape_typeare consistent with the broader refactoring that removed theShapeGeometrystructured types and simplified the attribute naming scheme. The functionality remains unchanged - these are still used to track the range of newly added shapes during URDF parsing.Also applies to: 320-320
newton/sim/flags.py (1)
38-38: LGTM! Docstring enhanced for better clarity.The expanded docstring properly clarifies that
NOTIFY_FLAG_SHAPE_PROPERTIEScovers shape transforms, geometry, and material properties. This improvement better reflects the scope of this flag, especially given the refactoring that replaced structured types with individual property arrays.newton/solvers/style3d/solver_style3d.py (1)
191-191: LGTM! Consistent with material property refactoring.The change from
self.model.shape_materialstoself.model.shape_material_mualigns with the systematic removal of structured types in favor of individual property arrays. This change is consistent with similar updates across other solver modules and the corresponding kernel update innewton/solvers/style3d/kernels.py.newton/tests/test_import_mjcf.py (1)
113-113: LGTM! Test updated for new attribute naming scheme.The change from
model.shape_geo_src[i]tomodel.shape_src[i]correctly updates the test to use the new simplified attribute name. The test logic and coverage remain unchanged - it still validates that meshes have the correctmaxhullvertvalues after MJCF parsing.newton/utils/import_mjcf.py (1)
768-768: LGTM! Attribute renaming aligns with refactoring.The changes from
builder.shape_geo_typetobuilder.shape_typeare consistent with the broader refactoring to remove theShapeGeometrystructured type and flatten shape geometry attributes. The logic for determining shape count ranges for collision filtering remains correct.Also applies to: 793-793
newton/examples/example_selection_materials.py (1)
205-205: LGTM! Material attribute access updated correctly.The changes from
"shape_materials.mu"to"shape_material_mu"correctly reflect the refactoring from structuredShapeMaterialstype to individual material property arrays. The functionality for accessing and setting friction coefficients remains unchanged.Also applies to: 210-210, 213-214
newton/tests/test_model.py (1)
252-252: LGTM! Test attribute references updated correctly.The test assertions have been properly updated to use the new attribute names (
shape_src,shape_type,shape_scale) instead of the oldshape_geo_*prefixed names. This aligns with the refactoring to remove theShapeGeometrystructured type. The test logic and verification remain unchanged.Also applies to: 256-258, 262-264
newton/utils/recorder.py (1)
183-183: LGTM! Serialization logic correctly updated.The removal of special handling for
ShapeMaterialsandShapeGeometrytypes in the serialization/deserialization methods is consistent with these structured types being removed from the codebase. The generic serialization logic for other supported types remains intact.Also applies to: 227-227
newton/tests/test_import_urdf.py (1)
164-165: LGTM! Test assertions updated for new attribute names.The test assertions have been correctly updated to use the new simplified attribute names (
shape_type,shape_scale,shape_src) instead of the oldshape_geo_*prefixed names. This maintains test coverage while aligning with the refactoring to remove theShapeGeometrystructured type. The test logic and verification conditions remain unchanged.Also applies to: 184-185, 187-188, 194-196
newton/solvers/style3d/kernels.py (1)
151-151: LGTM! Consistent parameter type refactoring.The replacement of
ShapeMaterialsstructured type withshape_material_mu: wp.array(dtype=float)aligns perfectly with the broader refactoring to remove structured material types in favor of individual arrays. The parameter is correctly passed through toevaluate_body_particle_contacton line 181.Also applies to: 181-181
newton/tests/test_import_usd.py (1)
252-252: LGTM! Test attributes correctly updated.All attribute renamings follow the consistent pattern of removing the
geoinfix from shape geometry attributes:
shape_geo_type→shape_typeshape_geo_src→shape_srcshape_geo_scale→shape_scaleThe test logic remains unchanged and correctly validates the refactored model structure.
Also applies to: 255-255, 261-261, 265-267, 271-271
newton/examples/example_mujoco.py (1)
107-107: LGTM! Attribute references correctly updated.All references to
articulation_builder.shape_geo_srchave been consistently updated toarticulation_builder.shape_src, maintaining the mesh simplification functionality while aligning with the refactored attribute naming convention.Also applies to: 109-109, 115-115, 120-120
newton/examples/example_anymal_c_walk_on_sand.py (1)
168-168: LGTM! Mesh processing attributes correctly updated.The attribute references have been consistently updated to follow the new naming convention:
shape_geo_src→shape_srcfor accessing mesh data- Shape scale now accessed via
shape_scaleThe collision shape filtering and mesh merging logic remains intact and functional.
Also applies to: 172-174
newton/solvers/xpbd/solver_xpbd.py (3)
314-314: LGTM! Material property parameter correctly updated.The replacement of
model.shape_materialswithmodel.shape_material_mucorrectly provides the friction coefficient array to the particle-shape contact solver, aligning with the refactoring to use individual material property arrays.
519-519: LGTM! Rigid contact material parameter correctly updated.The replacement of
model.shape_materialswithmodel.shape_material_mucorrectly provides the friction coefficient to the rigid body contact position solver.
633-633: LGTM! Restitution kernel parameters correctly updated.The changes properly update the restitution kernel call:
model.shape_materials→model.shape_material_restitutionprovides the specific restitution coefficients- Contact thickness correctly split into
rigid_contact_thickness0andrigid_contact_thickness1for more granular controlBoth changes align with the broader refactoring to use individual property arrays.
Also applies to: 638-639
newton/solvers/featherstone/solver_featherstone.py (1)
401-405: LGTM! Correct implementation of material property flattening.The replacement of the single
model.shape_materialsparameter with individual material property arrays (shape_material_ke,shape_material_kd,shape_material_kf,shape_material_ka,shape_material_mu) correctly implements the PR objective to remove structured types and use flat Warp arrays.newton/sim/collide.py (4)
48-50: LGTM! Correct shape geometry attribute flattening.The replacement of nested shape geometry attributes (
shape_geo.type,shape_geo.scale,shape_geo.source) with flat attributes (shape_type,shape_scale,shape_source) correctly implements the structural refactoring to remove ShapeGeometry structs.
170-172: LGTM! Consistent shape geometry flattening.The shape geometry attribute flattening is correctly applied to the
create_soft_contactskernel launch, maintaining consistency with the broader refactoring effort.
202-204: LGTM! Shape geometry flattening applied consistently.The broadphase collision pairs kernel correctly uses the flattened shape geometry attributes, maintaining consistency across all collision-related kernel launches.
236-239: LGTM! Complete shape geometry attribute flattening.The
handle_contact_pairskernel launch correctly implements the complete flattening of shape geometry attributes, including the transformation ofshape_geo.thicknesstoshape_thickness. All changes align with the PR objectives.newton/tests/test_mujoco_solver.py (7)
669-669: LGTM! Test updated for flattened shape type attribute.The test correctly uses the new
shape_typeattribute instead of the nestedshape_geo.type, maintaining the same test logic while adapting to the API changes.
673-676: LGTM! Material property attributes correctly flattened in tests.The test code correctly updates from structured material properties (
shape_materials.mu,shape_materials.ke,shape_materials.kd) to flattened arrays (shape_material_mu,shape_material_ke,shape_material_kd), preserving the original test validation logic.
851-851: LGTM! Material property assignment updated correctly.The assignment to
shape_material_mucorrectly replaces the previous nested structure access, maintaining the test's functionality while using the new flattened API.
856-857: LGTM! Contact parameter assignments updated correctly.The assignments to
shape_material_keandshape_material_kdcorrectly use the new flattened material property arrays, maintaining the test's ability to update contact parameters.
866-866: LGTM! Shape scale reading updated correctly.The test correctly reads from the flattened
shape_scaleattribute instead of the nestedshape_geo.scale, maintaining the same test functionality.
869-869: LGTM! Shape scale assignment updated correctly.The assignment to the flattened
shape_scaleattribute correctly replaces the previous nested structure assignment, preserving the test's ability to update shape sizes.
1088-1089: LGTM! Shape source attribute access updated correctly.The test correctly uses the renamed
shape_srcattribute (previouslyshape_geo_src) to access mesh objects and verify theirmaxhullvertproperties, maintaining the test's validation logic.newton/solvers/mujoco/solver_mujoco.py (5)
1789-1789: LGTM!The attribute name change from
model.shape_geo_srctomodel.shape_srcis consistent with the refactoring to flat arrays.
1832-1833: LGTM!The attribute name changes from
model.shape_materials.mutomodel.shape_material_muare consistent with the refactoring to flat arrays and follow a clear naming convention.
2166-2166: LGTM!The attribute name change from
model.shape_materials.mutomodel.shape_material_muis consistent with the broader refactoring.
2371-2377: LGTM!All attribute name changes are consistent with the refactoring from structured types to flat arrays:
shape_materials.*→shape_material_*shape_geo.*→shape_*The parameter updates correctly reflect the new flat array structure.
1651-2377: No remaining references to old structured types in solver_mujoco.pyAll searches for
shape_geo.,shape_materials., andshape_geo_srcreturned no hits, confirming that the old structured‐type attributes have been fully removed or renamed. No further changes are required.newton/solvers/vbd/solver_vbd.py (5)
540-540: LGTM! Parameter refactoring is consistent with the broader changes.The replacement of structured
ShapeMaterialswith flatshape_material_muarray is correctly implemented. The usage pattern on line 572 properly accesses the friction coefficient viashape_material_mu[shape_index].Also applies to: 572-572
1664-1664: LGTM! Kernel parameter passing is correctly updated.The function signature and parameter passing to
evaluate_body_particle_contactare consistent with the refactoring to use flat arrays instead of structured types.Also applies to: 1815-1815
1926-1926: LGTM! Consistent parameter refactoring for no-self-contact kernel.The function signature and parameter passing follow the same pattern as other kernel functions in the refactor.
Also applies to: 1958-1958
2728-2728: LGTM! Consistent usage across all solver methods.The method correctly uses the refactored
self.model.shape_material_muattribute, maintaining consistency with other solver methods.
2552-2552: Confirmed:Model.shape_material_muis defined and populated – approving change.The
Modelclass innewton/sim/model.pyinitializesself.shape_material_mu = Noneand the builder in
newton/sim/builder.pyreplaces it with awp.array, so the solver’s use ofself.model.shape_material_muis valid.newton/solvers/xpbd/kernels.py (4)
134-134: LGTM: Function signature updated correctlyThe parameter change from
ShapeMaterialstoshape_material_mu: wp.array(dtype=float)properly implements the refactoring to use flat arrays instead of structured types.
184-184: LGTM: Material property access updated correctlyThe change from structured field access to direct array indexing (
shape_material_mu[shape_index]) is consistent with the refactoring objectives and maintains the correct indexing logic.
2083-2083: LGTM: Material property parameters and access updated consistentlyThe function parameter and material property access changes correctly implement the flat array approach:
- Parameter changed to
shape_material_mu: wp.array(dtype=float)- Array access uses proper indexing for friction coefficient calculation
Also applies to: 2166-2169
2318-2318: LGTM: Restitution and contact thickness changes implemented correctlyThe changes properly implement the refactoring:
- Restitution parameter changed to
shape_material_restitution: wp.array(dtype=float)- Contact thickness split into
contact_thickness0andcontact_thickness1arrays- Thickness computation correctly sums both values:
contact_thickness0[tid] + contact_thickness1[tid]- Array access patterns for restitution are consistent with the new approach
This improves the handling of per-shape properties in contact pairs.
Also applies to: 2323-2324, 2348-2352, 2396-2396
newton/sim/model.py (3)
95-107: LGTM: Shape material properties properly flattenedThe individual shape material property arrays are well-defined with:
- Consistent naming convention (
shape_material_*)- Proper type annotations (
wp.array(dtype=float))- Clear documentation for each property
- Complete coverage of all material properties (elastic stiffness, damping, friction, adhesion, friction coefficient, restitution)
This correctly implements the refactoring from composite
ShapeMaterialsto individual arrays.
109-123: LGTM: Shape geometry properties properly flattened and renamedThe individual shape geometry property arrays are well-implemented:
- Consistent naming convention (
shape_*instead ofshape_geo_*)- Appropriate data types for each property (int32, bool, float, uint64, etc.)
- Complete coverage of geometry properties (type, solidity, thickness, source, scale, filter)
shape_geo_srcproperly renamed toshape_srcfor consistencyThis correctly implements the flattening of
ShapeGeometryinto individual arrays.
383-394: LGTM: Attribute frequency mapping updated correctlyThe
attribute_frequencydictionary updates properly reflect the new individual shape properties:
- All new shape material properties (
shape_material_*) correctly mapped to "shape"- All new shape geometry properties (
shape_*) correctly mapped to "shape"- Complete coverage of all the flattened attributes
- Maintains consistency with the existing attribute frequency system
This ensures that functionality depending on attribute frequency classification continues to work correctly.
newton/utils/render.py (2)
278-283: Arguments rename propagated correctlyThe
populate()call site has been updated to passmodel.shape_src,model.shape_type,model.shape_scale,model.shape_thickness, andmodel.shape_is_solid, matching the new flattened arrays introduced in the model. Good catch – this prevents a runtime mismatch between the renderer and the model.
788-791: raycast_kernel signature correctly matches passed argumentsThe
raycast_kernelinnewton/geometry/raycast.pyis defined as:def raycast_kernel( body_q: wp.array(dtype=wp.transform), shape_body: wp.array(dtype=int), shape_transform: wp.array(dtype=wp.transform), geom_type: wp.array(dtype=int), # 4th parameter geom_size: wp.array(dtype=wp.vec3), # 5th parameter ray_origin: wp.vec3, ray_direction: wp.vec3, lock: wp.array(dtype=wp.int32), ... ):In
newton/utils/render.pythe launch call passes:
- 4th argument:
self.model.shape_type(wp.array(dtype=int)) → matchesgeom_type- 5th argument:
self.model.shape_scale(wp.array(dtype=wp.vec3)) → matchesgeom_sizeNo changes are needed.
newton/sim/builder.py (8)
326-330: LGTM! Improved attribute naming consistency.The systematic renaming from
shape_geo_*toshape_*improves clarity by removing the redundant "geo" infix. The changes are consistent with the broader refactor to flatten shape geometry representation.
461-461: Correct property update.The property correctly references the renamed
shape_typeattribute.
671-675: Consistent attribute list update.The attribute names in the extension list correctly match the renamed attributes from the constructor.
1362-1362: Correct attribute reference update.The visualization method correctly uses the renamed
shape_typeattribute.
2215-2357: Comprehensive attribute renaming in approximate_meshes method.All shape attribute references have been systematically updated throughout the method:
shape_geo_type→shape_typeshape_geo_src→shape_srcshape_geo_scale→shape_scaleshape_geo_thickness→shape_thicknessshape_geo_is_solid→shape_is_solidThe method logic remains unchanged and all references are consistent.
1776-1780: Correct attribute updates in add_shape method.The shape creation method correctly uses all the renamed attributes while maintaining the same functionality.
3448-3484: Correct Model finalization with renamed attributes.The finalize method correctly creates Warp arrays using all the renamed shape attributes:
- Uses
shape_srcfor geometry sources- Creates arrays for
shape_type,shape_scale,shape_is_solid,shape_thickness- Maintains all material property arrays with correct naming
The functionality is preserved while using the improved naming convention.
3677-3677: Final shape_count assignment updated correctly.The Model's shape_count property correctly uses the renamed
shape_typeattribute.newton/solvers/euler/kernels.py (6)
687-691: LGTM: Clean parameter declaration refactoring.The individual material property arrays are well-named and properly typed. This flattened approach should improve GPU kernel performance compared to structured access patterns.
744-747: LGTM: Correct material property indexing.The array indexing with
shape_indexis consistent across all material properties, and the averaging logic is preserved correctly.
803-807: LGTM: Consistent parameter declarations.The material property parameter declarations match the pattern established in
eval_particle_contacts, maintaining consistency across the codebase.
845-849: LGTM: Correct material property accumulation.The indexing and accumulation logic is consistent for both shapes. The material properties are properly accessed using
shape_aandshape_bindices, and the averaging calculation later divides bymat_nonzerocorrectly.Also applies to: 853-857
1623-1627: LGTM: Correct kernel arguments.The arguments passed match the kernel parameter declarations exactly, with proper ordering and naming convention.
1703-1707: LGTM: Consistent kernel arguments.The arguments follow the same pattern as
eval_body_contact_forces, maintaining consistency across both contact evaluation functions.
Signed-off-by: Eric Heiden <eheiden@nvidia.com>
Signed-off-by: Eric Heiden <eheiden@nvidia.com>
…into remove-materials-geo
Signed-off-by: Eric Heiden <eheiden@nvidia.com>
Signed-off-by: Eric Heiden <eheiden@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
docs/migration.rst(1 hunks)newton/examples/example_anymal_c_walk_on_sand.py(1 hunks)newton/examples/example_g1.py(3 hunks)newton/examples/example_mujoco.py(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- newton/examples/example_mujoco.py
- docs/migration.rst
🚧 Files skipped from review as they are similar to previous changes (1)
- newton/examples/example_anymal_c_walk_on_sand.py
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: the use_mujoco option in newton/examples/example_mujoco.py is currently unsupported and causes crash...
Learnt from: Kenny-Vilella
PR: newton-physics/newton#398
File: newton/examples/example_mujoco.py:352-352
Timestamp: 2025-07-14T03:57:29.670Z
Learning: The use_mujoco option in newton/examples/example_mujoco.py is currently unsupported and causes crashes. The code automatically disables this option with a warning message when users attempt to enable it. This is intentionally kept as a placeholder for future implementation.
Applied to files:
newton/examples/example_g1.py
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Run GPU Unit Tests on AWS EC2 (Pull Request)
- GitHub Check: Run GPU Benchmarks (Pull Request)
🔇 Additional comments (2)
newton/examples/example_g1.py (2)
39-39: LGTM: Explicit up_axis parameter improves clarity.Making the
up_axis="Y"parameter explicit instead of relying on defaults enhances code readability and ensures consistent behavior across the codebase.
55-55: LGTM: Consistent explicit parameter usage.Good practice to explicitly specify the
up_axis="Y"parameter for consistency with the articulation builder and improved code clarity.
Signed-off-by: Eric Heiden <eheiden@nvidia.com>
Signed-off-by: Eric Heiden <eheiden@nvidia.com>
Signed-off-by: Eric Heiden <eheiden@nvidia.com>
Signed-off-by: Eric Heiden <eheiden@nvidia.com>
Description
Newton Migration Guide
Please ensure the migration guide for warp.sim users is up-to-date with the changes made in this MR.
docs/migration.rstis up-to dateBefore your PR is "Ready for review"
newton/tests/test_examples.py)pre-commit run -aSummary by CodeRabbit
Refactor
Bug Fixes
Documentation
Tests