Unverified Commit ced52cd9 authored by ooctipus's avatar ooctipus Committed by GitHub

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: 's avatarKelly Guo <kellyg@nvidia.com>
parent 8b590c1a
...@@ -376,9 +376,6 @@ class DirectRLEnv(gym.Env): ...@@ -376,9 +376,6 @@ class DirectRLEnv(gym.Env):
reset_env_ids = self.reset_buf.nonzero(as_tuple=False).squeeze(-1) reset_env_ids = self.reset_buf.nonzero(as_tuple=False).squeeze(-1)
if len(reset_env_ids) > 0: if len(reset_env_ids) > 0:
self._reset_idx(reset_env_ids) self._reset_idx(reset_env_ids)
# update articulation kinematics
self.scene.write_data_to_sim()
self.sim.forward()
# if sensors are added to the scene, make sure we render to reflect changes in reset # if sensors are added to the scene, make sure we render to reflect changes in reset
if self.sim.has_rtx_sensors() and self.cfg.rerender_on_reset: if self.sim.has_rtx_sensors() and self.cfg.rerender_on_reset:
self.sim.render() self.sim.render()
......
...@@ -220,9 +220,6 @@ class ManagerBasedRLEnv(ManagerBasedEnv, gym.Env): ...@@ -220,9 +220,6 @@ class ManagerBasedRLEnv(ManagerBasedEnv, gym.Env):
self.recorder_manager.record_pre_reset(reset_env_ids) self.recorder_manager.record_pre_reset(reset_env_ids)
self._reset_idx(reset_env_ids) self._reset_idx(reset_env_ids)
# update articulation kinematics
self.scene.write_data_to_sim()
self.sim.forward()
# if sensors are added to the scene, make sure we render to reflect changes in reset # if sensors are added to the scene, make sure we render to reflect changes in reset
if self.sim.has_rtx_sensors() and self.cfg.rerender_on_reset: if self.sim.has_rtx_sensors() and self.cfg.rerender_on_reset:
......
...@@ -1879,7 +1879,6 @@ def test_write_joint_state_data_consistency(sim, num_articulations, device, grav ...@@ -1879,7 +1879,6 @@ def test_write_joint_state_data_consistency(sim, num_articulations, device, grav
rand_joint_vel = vel_dist.sample() rand_joint_vel = vel_dist.sample()
articulation.write_joint_state_to_sim(rand_joint_pos, rand_joint_vel) articulation.write_joint_state_to_sim(rand_joint_pos, rand_joint_vel)
articulation.root_physx_view.get_jacobians()
# make sure valued updated # make sure valued updated
assert torch.count_nonzero(original_body_states[:, 1:] != articulation.data.body_state_w[:, 1:]) > ( assert torch.count_nonzero(original_body_states[:, 1:] != articulation.data.body_state_w[:, 1:]) > (
len(original_body_states[:, 1:]) / 2 len(original_body_states[:, 1:]) / 2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment