Skip to content

[BUG FIX] Fix point-cloud rendering from Camera depth map.#1512

Merged
duburcqa merged 1 commit intoGenesis-Embodied-AI:mainfrom
ceasor-mao:fix-issue-1504
Aug 6, 2025
Merged

[BUG FIX] Fix point-cloud rendering from Camera depth map.#1512
duburcqa merged 1 commit intoGenesis-Embodied-AI:mainfrom
ceasor-mao:fix-issue-1504

Conversation

@ceasor-mao
Copy link
Contributor

@ceasor-mao ceasor-mao commented Aug 6, 2025

Description

Fixes #1504. In file genesis/vis/camera.py backproject_depth_to_pointcloud, the original code attempted to reshape a point-cloud array with

point_cloud_world[:, :3].reshape((*depth, 3))

where depth is a 320×320 np.ndarray.
Unpacking *depth produced 320 separate integer dimensions, blowing past NumPy’s 64-D limit and raising
ValueError: maximum supported dimension for an ndarray is currently 64, found 321
As a result, replace *depth with *depth.shape so that only the true spatial dimensions (H, W, 3) are used:

point_cloud_world[:, :3].reshape((*depth.shape, 3))

Related Issue

Resolves #1504

Motivation and Context

How Has This Been / Can This Be Tested?

Screenshots (if appropriate):

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.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@duburcqa duburcqa enabled auto-merge (squash) August 6, 2025 16:36
@duburcqa duburcqa disabled auto-merge August 6, 2025 16:36
@duburcqa duburcqa enabled auto-merge (squash) August 6, 2025 16:36
@YilingQiao
Copy link
Collaborator

The CI failed. Should we merged #1514 and rerun CI for this PR @duburcqa

@duburcqa duburcqa changed the title [BUG FIX] resolve dimension issue when reshaping point cloud [BUG FIX] Fix point-cloud rendering from Camera depth map. Aug 6, 2025
@duburcqa duburcqa disabled auto-merge August 6, 2025 19:29
@duburcqa duburcqa merged commit ae58b2c into Genesis-Embodied-AI:main Aug 6, 2025
17 of 18 checks passed
winnieyangwannan pushed a commit to winnieyangwannan/Genesis that referenced this pull request Sep 14, 2025
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.

[Bug]: render_pointcloud reshape error

3 participants