Skip to content

[FEATURE] Add dedicated sensor manager.#1518

Merged
duburcqa merged 20 commits intoGenesis-Embodied-AI:mainfrom
Milotrince:sensors
Aug 13, 2025
Merged

[FEATURE] Add dedicated sensor manager.#1518
duburcqa merged 20 commits intoGenesis-Embodied-AI:mainfrom
Milotrince:sensors

Conversation

@Milotrince
Copy link
Contributor

@Milotrince Milotrince commented Aug 7, 2025

Description

Add SensorManager to Simulator. Sensor classes can now have per-scene multi-sensor caching.

Related Issue

Rigid Tactile Sensors #1451 will be rebased on this PR.
IMU Sensor Milotrince#1 is also based on this PR. (I can't do a "stacked PR" directly in Genesis repo since my branch doesn't live there, which is why the PR currently lives in my fork of Genesis)

Motivation and Context

The current sensor implementation does not allow for caching across multiple sensors, and usage is un-Genesis-like (unintuitive, e.g. does not align with add_camera pattern). See new IMU for an implementation/usage example.

How Has This Been / Can This Be Tested?

Will add tests per sensor.

Checklist:

  • I read the CONTRIBUTING document.
  • I followed the Submitting Code Changes section of CONTRIBUTING document.
  • I tagged the title correctly (including BUG FIX/FEATURE/MISC/BREAKING)
  • I updated the documentation accordingly or no change is needed.
  • I tested my changes and added instructions on how to test it for reviewers.

@Milotrince Milotrince marked this pull request as draft August 7, 2025 18:52
@Milotrince Milotrince marked this pull request as ready for review August 7, 2025 23:11
@Milotrince Milotrince force-pushed the sensors branch 2 times, most recently from 7a59c0d to 9906ee6 Compare August 7, 2025 23:31
YilingQiao
YilingQiao previously approved these changes Aug 7, 2025
@Milotrince
Copy link
Contributor Author

Some design decisions made:

  1. Why have a SensorManager?

Typically in a scene, a robot may have multiple of the same type of sensor. Previously the implementation tried to cache sensor data at the class level, but this will not work when running multiple scenes. The SensorManager is owned by Simulator and thus can operate at the per-scene, per-sensor-type level. It can also automatically update all sensors (see below)

  1. Why does SensorManager need to updated all sensors at step() instead of computing values at read?

For time delay and other types of noise, we will need to buffer the history. So either users will have to call step themselves (or otherwise face unintended/inaccurate values), or we can cleanly handle this inside of the simulator step (more aligned to Genesis's usage design).

  1. Why is read() now handled at the base Sensor?

For future contributions of new sensors, we want to enforce usage of the cross-batch, cross-sensor-type caching mechanism to ensure high sensor performance in Genesis.

@duburcqa duburcqa changed the title [FEATURE] [BREAKING] SensorManager [FEATURE] SensorManager Aug 11, 2025
@duburcqa duburcqa changed the title [FEATURE] SensorManager [FEATURE] Add dedicated sensor manager. Aug 12, 2025
@Milotrince Milotrince force-pushed the sensors branch 2 times, most recently from 59db13f to 832c196 Compare August 12, 2025 22:34
duburcqa
duburcqa previously approved these changes Aug 12, 2025
@Milotrince
Copy link
Contributor Author

looks like unit test failed because of camera

auto-merge was automatically disabled August 12, 2025 23:13

Head branch was pushed to by a user without write access

@duburcqa duburcqa enabled auto-merge (squash) August 12, 2025 23:18
@duburcqa duburcqa merged commit e2f4566 into Genesis-Embodied-AI:main Aug 13, 2025
18 of 19 checks passed
YilingQiao pushed a commit to YilingQiao/Genesis that referenced this pull request Aug 22, 2025
winnieyangwannan pushed a commit to winnieyangwannan/Genesis that referenced this pull request Sep 14, 2025
@Milotrince Milotrince deleted the sensors branch September 16, 2025 18:05
Kashu7100 pushed a commit to Kashu7100/Genesis that referenced this pull request Jan 26, 2026
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.

3 participants