From 92f2b8ce5ce9806379342efb7c430c15e73f30e1 Mon Sep 17 00:00:00 2001 From: Mayank Mittal Date: Sun, 22 Dec 2024 14:22:10 +0100 Subject: [PATCH] adds a fix for pushing root velocity --- .../extensions/omni.isaac.lab/omni/isaac/lab/envs/mdp/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/mdp/events.py b/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/mdp/events.py index 44a58374e1..61856d63a4 100644 --- a/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/mdp/events.py +++ b/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/mdp/events.py @@ -628,7 +628,7 @@ def push_by_setting_velocity( # sample random velocities range_list = [velocity_range.get(key, (0.0, 0.0)) for key in ["x", "y", "z", "roll", "pitch", "yaw"]] ranges = torch.tensor(range_list, device=asset.device) - vel_w[:] = math_utils.sample_uniform(ranges[:, 0], ranges[:, 1], vel_w.shape, device=asset.device) + vel_w += math_utils.sample_uniform(ranges[:, 0], ranges[:, 1], vel_w.shape, device=asset.device) # set the velocities into the physics simulation asset.write_root_com_velocity_to_sim(vel_w, env_ids=env_ids)