Skip to content

[Bug Report] Field self.drift in Raycaster does not update correct when reset is called #1820

@zoctipus

Description

@zoctipus

Describe the bug

the reset function raycaster recalculates the drifting value, but the returned value did not get saved to self.drift. Namely

    def reset(self, env_ids: Sequence[int] | None = None):
        # reset the timers and counters
        super().reset(env_ids)
        # resolve None
        if env_ids is None:
            env_ids = slice(None)
        # resample the drift
        self.drift[env_ids].uniform_(*self.cfg.drift_range)     <---------------------   Drift isn't updated

the fix is to ensure self.drift gets updated

self.drift = self.drift[env_ids].uniform_(*self.cfg.drift_range)

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have checked that the issue is not in running Isaac Sim itself and is related to the repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions