Skip to content

feat: add DistanceNoiseStd and FlipHitProbability to RayPerceptionSensor #6215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

raelbarros
Copy link

Proposed change(s)

Adds native noise support to ray-based perception sensors.

Together these parameters let users add controlled realistic imperfection directly from the Inspector, simulating real-world sensor noise, making the system more robust.

New public fields on RayPerceptionSensorComponents:

  • DistanceNoiseStd – Adds zero-mean Gaussian noise to HitFraction, the normalised distance returned by each ray.
  • FlipHitProbability – Given probability to inverts the boolean HasHit flag of the ray (0 → 1 or 1 → 0).

Core logic implemented inside RayPerceptionSensor.ApplyNoise, called during Write() so that observations fed to the policy already include noise.

Editor updated: a Noise fold-out appears in the Inspector with the two sliders.

Docs & CHANGELOG updated accordingly. Default values 0 keep full backward compatibility.

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

n/a

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant