Unverified Commit 06c84fa1 authored by Vladimir Fokow's avatar Vladimir Fokow Committed by GitHub

Fixes example in migration docs (#708)

# Description

Fixes inaccuracy in migration docs.
Now the docs correspond to the actual code.

Fixes #706

## Type of change

- This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] 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
parent 7937a186
......@@ -782,7 +782,7 @@ The ``progress_buf`` variable has also been renamed to ``episode_length_buf``.
| velocities = 0.5 * (torch.rand((len(env_ids), self.num_dof), | |
| device=self.device) - 0.5) | time_out = self.episode_length_buf >= self.max_episode_length - 1 |
| | out_of_bounds = torch.any(torch.abs( |
| self.dof_pos[env_ids, :] = positions[:] | self.joint_pos[:, self._pole_dof_idx] > self.cfg.max_cart_pos), |
| self.dof_pos[env_ids, :] = positions[:] | self.joint_pos[:, self._cart_dof_idx]) > self.cfg.max_cart_pos, |
| self.dof_vel[env_ids, :] = velocities[:] | dim=1) |
| | out_of_bounds = out_of_bounds | torch.any( |
| env_ids_int32 = env_ids.to(dtype=torch.int32) | torch.abs(self.joint_pos[:, self._pole_dof_idx]) > math.pi / 2, |
......
......@@ -706,7 +706,7 @@ reset the ``episode_length_buf`` buffer.
| resets = torch.where( | |
| torch.abs(self.pole_pos) > math.pi / 2, 1, resets) | time_out = self.episode_length_buf >= self.max_episode_length - 1 |
| resets = torch.where( | out_of_bounds = torch.any(torch.abs( |
| self.progress_buf >= self._max_episode_length, 1, resets) | self.joint_pos[:, self._pole_dof_idx] > self.cfg.max_cart_pos), |
| self.progress_buf >= self._max_episode_length, 1, resets) | self.joint_pos[:, self._cart_dof_idx]) > self.cfg.max_cart_pos, |
| self.reset_buf[:] = resets | dim=1) |
| | out_of_bounds = out_of_bounds | torch.any( |
| | torch.abs(self.joint_pos[:, self._pole_dof_idx]) > math.pi / 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