Skip to content

Reduce Sharpa startup costs and improve RJ45 grasping - #8785

Open
maxkra15 wants to merge 17 commits into
isaac-sim:mainfrom
maxkra15:maxkra15/sharpa-scene-startup
Open

maxkra15 wants to merge 17 commits into
isaac-sim:mainfrom
maxkra15:maxkra15/sharpa-scene-startup

Conversation

@maxkra15

@maxkra15 maxkra15 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Sharpa startup built large nested Python payloads and imported visual geometry that native USD renderers did not use. Keep those payloads compact and load prepared visuals through the public asset root. The RJ45 follow-up improves middle-finger support during seating and stabilizes latch retention after release.

  • Preserve coffee/teapot NumPy payloads and reuse the existing mesh triangulation helper.
  • Import coffee/RJ45 Newton visual geometry only when Newton GL is selected.
  • Load the default GL switch front from three prepared material meshes, preserving all 1,151,285 triangles and authored normals. --backdrop datacenter retains the full rack; Kit/OVRTX retain their native scenery.
  • Use the public 512-pixel robot texture layer, referencing the existing geometry and physics. Disable unused hydroelastic contact-surface visualization output.
  • Preserve the calibrated hand reset pose, then decrease the middle MCP-FE target by 0.01 rad (0.57 degrees) through the existing 0.2 s closing ramp. Contact measurements showed the middle pad could carry zero normal force during final seating; the preload supplies support.
  • Set the rigid coupler entry to two local MJWarp substeps. This resolves the reproduced post-release latch loss in the tested cases while keeping the global substep count, cable simulation rate and control rate unchanged.

Scope against main: 14 files, +89/-54 lines. The switch front (30.5 MB) and texture layer/maps (3.04 MB) are public in the Isaac Sim 6.2 asset bundle. The changes use existing APIs and demo preparation paths.

Validation

Main 9860e2bd8, Newton 42f7def1, RTX PRO 6000 Blackwell GPU. Final configuration at 140262844:

  • Stock full-cycle RJ45 runs: 5/5 passed — Newton GL seeds 17/23, Kit seeds 17/23, and OVRTX (newton_rtx) seed 17. Each completed insertion, release, regrasp and 59.8–59.9 mm withdrawal. Results use the demo's reported success and finite-state checks, not process exit alone.
  • A separate Kit seed-17 retention trace stayed captured for 5 simulated seconds after release, with positive axial capture margin of 0.270–0.403 mm and at most 0.041 mm head movement per control step. The original rigid-step configuration reproduced a 9.56 mm jump after the fingers had opened.
  • Standalone CPU suite: 40 passed, 393 optional native rows skipped. Existing coupling CPU suite: 66 passed. Formatting, lint and changelog checks passed.
  • Unchanged startup/demo owners retain validation at da243da4e: all 11 supported bounded startup/render launches and the strict Sphinx build passed. Dry coffee delivered 1.242 g; wet coffee delivered 1.244 g with 1.274 g dissolved; teapot completed its 18 s pickup/pour/recovery sequence.

The final native runs used the exact committed environment configuration. Controller guards, gains, friction and success thresholds are unchanged. Two rigid substeps add rigid-solver work; the cable and outer collision rates remain unchanged. Shared-GPU wall times are not a performance comparison.

Remaining limits

Five full cycles establish the tested cases, not broad reliability across seeds or hardware. Existing Newton GL arm UDIM texture-resolution warnings also occur on unmodified main; inspected frames remain usable. CI for the final commit is running separately from the completed local/native checks above.

@maxkra15

Copy link
Copy Markdown
Contributor Author

run-ci

@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Oct 22, 2026
@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 22, 2026
@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable defects were established.

Summary

This PR reduces presentation work when the Sharpa demos start.

  • Coffee starts with a studio in Newton GL and keeps the kitchen optional.
  • The teapot demo runs with Kit, Newton GL, OVRTX, or no visualizer.
  • RJ45 Newton GL shows the switch front and ports by default.
  • Teapot setup assigns its large lists after building the scene config.
  • Newton GL reuses file textures and can limit their upload size.

No actionable defects were established. maxkra15 explicitly documents that no new tests were added.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Choose visualizers and backdrop] --> B[Launcher resolves viewers and cameras]
  B --> C{Newton GL selected?}
  C -->|Yes| D[Import Newton visual meshes]
  C -->|No| E[Skip visual-only Newton meshes]
  D --> F[Build scene]
  E --> F
  F --> G[GL uploads model textures]
  F --> H[Kit and OVRTX read USD scene]
  G --> I[Reuse decoded textures during upload]
Loading

Reviews (1) · Last reviewed commit: "Reduce Sharpa demo scene startup costs" · Reviewed by Greptile

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isaac Lab Review Bot

Needs attention: Style consistency (4). Other reviewed categories look good.

  • PR description: Add the omitted cable-color fix and reproducible base-versus-head coffee/RJ45 startup comparisons with revisions, command, environment count, hardware, backend, warmup, and metric.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: No breaking changes identified.
  • Implementation: Implementation looks good.
  • Style consistency: Added backdrop documentation is inaccurate and duplicated; correct the robot-only room claim and consolidate the RJ45 default description.
  • Test quality: Test quality looks good.

Minor fixes needed. Posted 4 inline findings.

Automated review; human maintainers own approval decisions.

Comment thread examples/demos/teapot_fill.py Outdated
"--backdrop",
choices=["auto", "studio", "room"],
default="auto",
help="Backdrop: auto uses a simple studio for GL and the full room for Kit/RTX.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning · Style Consistency — Backdrop help overstates room contents

cfg.room is only added when --robot rizon_sharpa is set, so --backdrop room loads just the kitchen island by default. State that the enclosed room applies only to the robot variant.

```

Omitting `--viz` selects Newton GL. Add `--extra video` and `--video` to record a run.
The default `--backdrop auto` shows the detailed gold switch front and all RJ45

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning · Style Consistency — Duplicated backdrop prose in README

Lines 21-24 restate the Newton GL and Kit/RTX backdrop defaults already given above, and break the sentence mid-clause after "In GL,". Keep one statement of the defaults and reflow it.

self.gui._render_scalar_plots = lambda: None
self.register_ui_callback(self._render_training_controls, position="side")

def set_model(self, model: newton.Model | None) -> None:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning · Style Consistency — New methods precede class properties

set_model and log_mesh sit between init and the camera_speed property, breaking the prescribed order of dunders, properties, then public instance methods. Move both below the property block.

"gravity": sim.cfg.gravity,
},
window_cfg=self.cfg.window,
texture_max_size=getattr(self.cfg.backend, "texture_max_size", None),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning · Style Consistency — getattr default hides backend-only field

The guide forbids getattr defaults for known attributes; only NewtonGLBackendCfg declares texture_max_size, so this shared initializer hides the capability difference. Read it in the GL visualizer or declare it on both backends.

Clarify backdrop documentation and keep GL-only settings at the GL
initialization boundary. Move pixel resizing to the shared image owner
while preserving the decoded texture cache and pixel behavior.

Integrate upstream main at e4df255.
@maxkra15

Copy link
Copy Markdown
Contributor Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 23, 2026
Integrate recorded upstream main while retaining source-owned coffee
floor visibility before cloning. Update the existing hard-reset check
to verify the configured texture limit reaches the replacement model.

Recorded upstream main: e907f82

@AntoineRichard AntoineRichard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Highlevel feedback. I'm confused by the texture size limitter. Othersize it looks reasonable.

Comment on lines +499 to +515
def resize_image(image: np.ndarray, max_size: int) -> np.ndarray:
"""Downsample an image with Lanczos filtering while preserving its aspect ratio.

Args:
image: Uint8 RGB or RGBA pixels, shape ``(H, W, C)``. The input is not modified.
max_size: Positive integer limiting both output dimensions [px]. The caller validates
this limit before processing images.

Returns:
A resized pixel array, or ``image`` itself when both dimensions already fit.
Images are never enlarged; resized dimensions follow Pillow's thumbnail rounding.
"""
if max(image.shape[:2]) <= max_size:
return image
resized = Image.fromarray(image)
resized.thumbnail((max_size, max_size), Image.Resampling.LANCZOS)
return np.array(resized)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

KInd of weird to have this utility here since it's not GPU capable? If it's only used to resize a texture, can we move it where its used?

if path not in self._model_texture_cache:
image = load_texture(texture)
if image is not None and self._texture_max_size is not None:
image = resize_image(image, self._texture_max_size)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why not use a lower resolution texture? I'm not convinced by this hack here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not convinced by the texture max size. Why not use a lower resolution texture to start with?

Integrate upstream main d78054a
to retain compatibility with current backend ownership and dependencies.
Integrate upstream main at ce2900d to keep
the branch current with shared API and dependency changes.

Validate the merged revision with focused checks and full formatting
and lint hooks before committing. Remote CI remains separate.
@maxkra15 maxkra15 changed the title Reduce Sharpa demo scene startup costs Reduce Sharpa demo startup preparation Oct 28, 2026
@maxkra15 maxkra15 changed the title Reduce Sharpa demo startup preparation Reduce Sharpa startup costs and improve RJ45 grasping Oct 28, 2026
Integrate upstream main at 6d37745 to keep
the branch current with shared API and dependency changes.

Validate the merged revision with focused checks and all repository
formatting and lint hooks. Remote CI remains separate.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants