-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[Newton] Fixes some errors with tiled camera reset and initialization #4256
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
[Newton] Fixes some errors with tiled camera reset and initialization #4256
Conversation
Signed-off-by: jiehanw <[email protected]>
Signed-off-by: jiehanw <[email protected]>
Signed-off-by: jiehanw <[email protected]>
Signed-off-by: jiehanw <[email protected]>
Signed-off-by: jiehanw <[email protected]>
Signed-off-by: jiehanw <[email protected]>
Signed-off-by: jiehanw <[email protected]>
Signed-off-by: jiehanw <[email protected]>
Greptile SummaryThis PR fixes critical bugs in the TiledCamera initialization and reset flow by migrating from Replicator API to Newton Warp renderer. Key Changes:
Architecture: Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Env as Environment
participant TC as TiledCamera
participant SB as SensorBase
participant Renderer as NewtonWarpRenderer
participant Newton as TiledCameraSensor
Note over Env,Newton: Initialization Flow
Env->>TC: __init__(cfg)
TC->>SB: Register initialization callback
Env->>Env: sim.play()
Env->>TC: _initialize_callback()
TC->>TC: _initialize_impl()
TC->>SB: _initialize_impl() (parent)
TC->>TC: Check renderer_type == "newton_warp"
TC->>Renderer: __init__(NewtonWarpRendererCfg)
TC->>Renderer: initialize()
Renderer->>Newton: TiledCameraSensor.alloc()
Renderer->>Renderer: Setup camera rays & buffers
TC->>TC: Set _is_initialized = True
Note over Env,Newton: Update/Render Flow
Env->>TC: update(dt)
TC->>TC: _update_buffers_impl(env_ids)
TC->>TC: _update_poses(env_ids)
TC->>TC: Get world poses & convert to torch
TC->>Renderer: render(pos, quat, intrinsics)
Renderer->>Renderer: Convert to OpenGL convention
Renderer->>Newton: TiledCameraSensor.render()
Newton-->>Renderer: RGB & Depth buffers
Renderer-->>TC: Output buffers (wp.array)
TC->>TC: Convert wp.array to torch
Note over Env,Newton: Reset Flow
Env->>TC: reset(env_ids)
TC->>SB: reset(env_ids) (parent)
TC->>TC: Reset frame counters
TC->>Renderer: reset()
Renderer->>Renderer: Clear state (no-op currently)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
source/isaaclab_tasks/isaaclab_tasks/direct/cartpole/cartpole_camera_env.py, line 263 (link)style: The
write_root_velocity_to_sim()call was removed. Check whether this is intentional - if the velocities should be reset to zero on environment reset, they may not be properly cleared now. Was removing the root velocity write intentional, or should velocities be reset to default_root_state[:, 7:] on environment reset?
13 files reviewed, 1 comment
Signed-off-by: Kelly Guo <[email protected]>
Description
TiledCamera has some errors with initialization and reset. also removing --enable_cameras since that's not needed for the warp renderer.
Depends on #4115
Cartpole RGB and Depth can both train to ~300 reward.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there