Skip to content

Commit

Permalink
adds a fix for pushing root velocity
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayankm96 committed Dec 22, 2024
1 parent dd044a4 commit 92f2b8c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 92f2b8c

Please sign in to comment.