diff --git a/CHANGELOG.md b/CHANGELOG.md index 146e6bf00..8551a212c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ - Fix allocating arrays with strides ([GH-404](https://github.com/NVIDIA/warp/issues/404)). - Fix `ImportError` exception being thrown during `OpenGLRenderer` interpreter shutdown on Windows ([GH-412](https://github.com/NVIDIA/warp/issues/412)). +- Fix scale and rotation issues with the rock geometry used in the granular collision SDF example + ([GH-409](https://github.com/NVIDIA/warp/issues/409)). ## [1.5.1] - 2025-01-02 diff --git a/warp/examples/sim/example_granular_collision_sdf.py b/warp/examples/sim/example_granular_collision_sdf.py index 861174e78..db81eb4ab 100644 --- a/warp/examples/sim/example_granular_collision_sdf.py +++ b/warp/examples/sim/example_granular_collision_sdf.py @@ -15,7 +15,6 @@ # Note: requires a CUDA-capable device ########################################################################### -import math import os import numpy as np @@ -66,8 +65,8 @@ def __init__(self, stage_path="example_granular_collision_sdf.usd"): sdf=rock_sdf, body=-1, pos=wp.vec3(0.0, 0.0, 0.0), - rot=wp.quat_from_axis_angle(wp.vec3(1.0, 0.0, 0.0), -0.5 * math.pi), - scale=wp.vec3(0.01, 0.01, 0.01), + rot=wp.quat(0.0, 0.0, 0.0, 1.0), + scale=wp.vec3(1.0, 1.0, 1.0), ) mins = np.array([-3.0, -3.0, -3.0]) @@ -149,13 +148,13 @@ def render(self): with wp.ScopedTimer("render"): self.renderer.begin_frame(self.sim_time) - # Note the extra wp.quat_from_axis_angle(wp.vec3(1.0, 0.0, 0.0), math.pi) is because .usd is oriented differently from .nvdb self.renderer.render_ref( name="collision", path=os.path.join(warp.examples.get_asset_directory(), "rocks.usd"), pos=wp.vec3(0.0, 0.0, 0.0), rot=wp.quat(0.0, 0.0, 0.0, 1.0), - scale=wp.vec3(0.01, 0.01, 0.01), + scale=wp.vec3(1.0, 1.0, 1.0), + color=(0.35, 0.55, 0.9), ) self.renderer.render_sphere(