Unverified Commit 92f8930f authored by Octi Zhang's avatar Octi Zhang Committed by GitHub

Fixes reset of sensor drift inside the RayCaster sensor (#1821)

## Description

The drift in raycaster didn't update when reset. This MR now updates it
correctly:

before:
```python
self.drift[env_ids].uniform_(*self.cfg.drift_range)
```

now:
```python
self.drift[env_ids] = self.drift[env_ids].uniform_(*self.cfg.drift_range)
```

Fixes #1820 

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## 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
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] 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 62d1de92
[package]
# Note: Semantic Versioning is used: https://semver.org/
version = "0.33.14"
version = "0.33.15"
# Description
title = "Isaac Lab framework for Robot Learning"
......
Changelog
---------
0.33.15 (2025-02-09)
~~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* Fixed not updating the ``drift`` when calling :func:`~isaaclab.sensors.RayCaster.reset`
0.33.14 (2025-02-01)
~~~~~~~~~~~~~~~~~~~~
......
......@@ -110,7 +110,7 @@ class RayCaster(SensorBase):
if env_ids is None:
env_ids = slice(None)
# resample the drift
self.drift[env_ids].uniform_(*self.cfg.drift_range)
self.drift[env_ids] = self.drift[env_ids].uniform_(*self.cfg.drift_range)
"""
Implementation.
......
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