Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/isaaclab/config/extension.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[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"
Expand Down
9 changes: 9 additions & 0 deletions source/isaaclab/docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
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)
~~~~~~~~~~~~~~~~~~~~

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def reset(self, env_ids: Sequence[int] | None = None):
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this required for uniform_? I think that might be an inplace operation already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for being careful, I have checked again in my debugger

>self.drift[env_ids]
tensor([[0., 0., 0.],
        [0., 0., 0.],
        [0., 0., 0.],
        ...,
        [0., 0., 0.],
        [0., 0., 0.],
        [0., 0., 0.]], device='cuda:0')
>self.drift[env_ids].uniform_(*self.cfg.drift_range)
tensor([[-0.0657,  0.0741, -0.0464],
        [-0.0895,  0.0378,  0.0849],
        [ 0.0414, -0.0142,  0.0127],
        ...,
        [ 0.0647,  0.0327, -0.0896],
        [ 0.0268, -0.0399, -0.0197],
        [ 0.0034, -0.0036,  0.0639]], device='cuda:0')
>self.drift[env_ids]
tensor([[0., 0., 0.],
        [0., 0., 0.],
        [0., 0., 0.],
        ...,
        [0., 0., 0.],
        [0., 0., 0.],
        [0., 0., 0.]], device='cuda:0')
        

as you see the self.drift is not updated after the uniform_ operation, though it returns a uniformly sampled values

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do remember styles in pytorch where they use _ to indicate in place operation, it is indeed strange how it didn't work here. My torch version is 2.5.1+cu118

Copy link
Contributor

@Mayankm96 Mayankm96 Feb 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem isn't with the in-place operation. Rther if you are indexing a torch tensor with explicit indices, it makes a "copy" of that tensor. So the original tensor isn't getting assigned but rather the copy of it.

Nice catch!


"""
Implementation.
Expand Down