Skip to content

Commit 574abc4

Browse files
authored
Fixes event term for pushing root by setting velocity (#1584)
# Description Previously, the event term set the current root velocity to the sampled values. However, this isn't the same as "pushing" the root. This MR fixes this issue by changing the operation inside. ## Type of change - New feature (non-breaking change which adds functionality) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
1 parent e277065 commit 574abc4

File tree

1 file changed

+1
-1
lines changed
  • source/extensions/omni.isaac.lab/omni/isaac/lab/envs/mdp

1 file changed

+1
-1
lines changed

source/extensions/omni.isaac.lab/omni/isaac/lab/envs/mdp/events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ def push_by_setting_velocity(
628628
# sample random velocities
629629
range_list = [velocity_range.get(key, (0.0, 0.0)) for key in ["x", "y", "z", "roll", "pitch", "yaw"]]
630630
ranges = torch.tensor(range_list, device=asset.device)
631-
vel_w[:] = math_utils.sample_uniform(ranges[:, 0], ranges[:, 1], vel_w.shape, device=asset.device)
631+
vel_w += math_utils.sample_uniform(ranges[:, 0], ranges[:, 1], vel_w.shape, device=asset.device)
632632
# set the velocities into the physics simulation
633633
asset.write_root_com_velocity_to_sim(vel_w, env_ids=env_ids)
634634

0 commit comments

Comments
 (0)