Skip to content

Commit ced52cd

Browse files
ooctipuskellyguo11
andauthored
Removes extra calls to write simulation after reset_idx (#3446)
# Description This PR removes the calls into write simulation after reset_idx, I think this is not needed anymore because of PR #2736 Lets see if it passes all test Fixes # (issue) <!-- As a practice, it is recommended to open an issue to have discussions on the proposed pull request. This makes it easier for the community to keep track of what is being developed or added, and if a given feature is demanded by more than one party. --> ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) ## Screenshots Please attach before and after screenshots of the change if applicable. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## Checklist - [ ] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [ ] 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 - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task --> --------- Co-authored-by: Kelly Guo <[email protected]>
1 parent 8b590c1 commit ced52cd

File tree

3 files changed

+0
-7
lines changed

3 files changed

+0
-7
lines changed

source/isaaclab/isaaclab/envs/direct_rl_env.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,6 @@ def step(self, action: torch.Tensor) -> VecEnvStepReturn:
376376
reset_env_ids = self.reset_buf.nonzero(as_tuple=False).squeeze(-1)
377377
if len(reset_env_ids) > 0:
378378
self._reset_idx(reset_env_ids)
379-
# update articulation kinematics
380-
self.scene.write_data_to_sim()
381-
self.sim.forward()
382379
# if sensors are added to the scene, make sure we render to reflect changes in reset
383380
if self.sim.has_rtx_sensors() and self.cfg.rerender_on_reset:
384381
self.sim.render()

source/isaaclab/isaaclab/envs/manager_based_rl_env.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,6 @@ def step(self, action: torch.Tensor) -> VecEnvStepReturn:
220220
self.recorder_manager.record_pre_reset(reset_env_ids)
221221

222222
self._reset_idx(reset_env_ids)
223-
# update articulation kinematics
224-
self.scene.write_data_to_sim()
225-
self.sim.forward()
226223

227224
# if sensors are added to the scene, make sure we render to reflect changes in reset
228225
if self.sim.has_rtx_sensors() and self.cfg.rerender_on_reset:

source/isaaclab/test/assets/test_articulation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1879,7 +1879,6 @@ def test_write_joint_state_data_consistency(sim, num_articulations, device, grav
18791879
rand_joint_vel = vel_dist.sample()
18801880

18811881
articulation.write_joint_state_to_sim(rand_joint_pos, rand_joint_vel)
1882-
articulation.root_physx_view.get_jacobians()
18831882
# make sure valued updated
18841883
assert torch.count_nonzero(original_body_states[:, 1:] != articulation.data.body_state_w[:, 1:]) > (
18851884
len(original_body_states[:, 1:]) / 2

0 commit comments

Comments
 (0)