Skip to content

Replace peak-magnitude scaling so absolute motion stays comparable across frames when saving RGB visualizations - #7029

Merged
huidongc merged 5 commits into
isaac-sim:developfrom
huidongc:fix-noise-in-motion-vectors
Aug 12, 2026
Merged

Replace peak-magnitude scaling so absolute motion stays comparable across frames when saving RGB visualizations#7029
huidongc merged 5 commits into
isaac-sim:developfrom
huidongc:fix-noise-in-motion-vectors

Conversation

@huidongc

Copy link
Copy Markdown
Collaborator

Description

Replace peak-magnitude scaling so absolute motion stays comparable across frames when saving RGB visualizations.

Fixes NVBUG#6520028

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Screenshots

Please attach before and after screenshots of the change if applicable.

Before After
franka_pour-newton-isaacsim_rtx_renderer-motion_vectors (before) franka_pour-newton-isaacsim_rtx_renderer-motion_vectors (after)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump extension.toml — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

Replace peak-magnitude scaling so absolute motion stays
comparable across frames when saving RGB visualizations.
@huidongc
huidongc requested a review from a team August 11, 2026 23:36
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Aug 11, 2026

@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

The motion-vector display path now uses fixed [-1, 1] clamping instead of per-frame peak normalization, preserving comparable absolute motion across saved frames. The implementation is focused and compatible, but this user-visible change needs an Isaac Lab changelog fragment before merge.

  • Design and architecture: The visualization policy remains localized in normalize_camera_output_for_display. Fixed scaling deliberately trades visibility of very small motion for consistent values across frames, matching the PR’s stated goal.
  • API: The function signature, float32 [0, 1] output range, and three-channel layout remain unchanged, so existing grid and image-saving consumers stay compatible. Motion-vector pixel values change visibly, requiring release-note coverage under the repository rules.
  • Implementation: Clamping, remapping, and appending a zero blue channel are shape-preserving and avoid the former division guard. Add a past-tense changelog fragment under source/isaaclab/changelog.d/ describing the fixed [-1, 1] motion-vector visualization scaling.

Minor fixes needed. Posted 1 actionable finding inline.

Automated review; human maintainers own approval decisions.

Comment thread source/isaaclab/isaaclab/utils/images.py
@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR replaces frame-relative peak-magnitude scaling with fixed-range clamping so motion-vector colors remain comparable across frames.

  • Clamps the U/V channels to [-1, 1], remaps them to RGB display values, and preserves a zero blue channel.
  • Updates the unit-test expectation and changelog to reflect saturation outside the fixed range.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported mismatch between the clamp behavior and unit-test expectation is fixed at current HEAD.

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/utils/images.py Replaces peak-based motion-vector normalization with fixed clamping and RGB packing.
source/isaaclab/test/utils/test_images.py Correctly updates the motion-vector fixture expectation to match the new clamping behavior.
source/isaaclab/changelog.d/huidongc-fix-noise-in-motion-vectors.rst Accurately documents the visualization behavior change and saturation semantics.

Reviews (2): Last reviewed commit: "Update test expectation" | Re-trigger Greptile

Comment thread source/isaaclab/isaaclab/utils/images.py
@huidongc
huidongc requested a review from rilei-nvidia August 11, 2026 23:51
@huidongc

Copy link
Copy Markdown
Collaborator Author

@greptile-apps

@huidongc

Copy link
Copy Markdown
Collaborator Author

@isaaclab-review-bot

@huidongc
huidongc requested a review from hujc7 as a code owner August 12, 2026 01:43

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The franka cloth env was recently re-configured by #6831 to have near-zero gravity at beginning and linearly increased to 9.8m/s/s, therefore we can't see motion of the cloth any more in the first couple of frames.

Maybe we should make another PR to modify the franka cloth rendering test so that it is able to capture potential regression for deformable motion vectors.

@huidongc
huidongc requested a review from nvsekkin August 12, 2026 02:11
@huidongc
huidongc merged commit 9349750 into isaac-sim:develop Aug 12, 2026
102 of 106 checks passed
@huidongc
huidongc deleted the fix-noise-in-motion-vectors branch August 12, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants