Skip to content

Visualize VoxelCollisionMap in Meshcat#22657

Draft
siddancha wants to merge 20 commits intoRobotLocomotion:masterfrom
siddancha:voxel-grid-in-meshcat
Draft

Visualize VoxelCollisionMap in Meshcat#22657
siddancha wants to merge 20 commits intoRobotLocomotion:masterfrom
siddancha:voxel-grid-in-meshcat

Conversation

@siddancha
Copy link
Copy Markdown
Contributor

@siddancha siddancha commented Feb 20, 2025

This PR adds a native Meshcat visualization of planning::VoxelCollisionMap using THREE.js' InstancedMesh of BoxGeometries.

  • Implements internal::InstancedMeshData to msgpack and set InstancedMesh objects in Meshcat.
  • Implements SetObject(BoxList) to set a list of boxes as an InstancedMesh object.
  • Implements SetObject(VoxelCollisionMap) as two BoxLists -- one for occupied cells (defaults to red) and another or unknown cells (defaults to semi-transparent black).

In addition, I had to do the following as temporary measures:

  • Expose planning/dev publicly so that it could be added as a dependency to Meshcat.

Test

This PR also adds a meshcat_voxel_grid_manual_test (along similar lines as meshcat_manual_test) to manually visualize a VoxelCollisionMap in Meshcat.

Run:

bazel test //geometry:meshcat_voxel_grid_manual_test
  • A 10x10x10 grid starts out with all unknown voxels:

  • Then, the bottom rows are updated to be occupied (red) and the middle rows are updated to be free space (no boxes are drawn for free voxels).


This change is Reviewable

@jwnimmer-tri
Copy link
Copy Markdown
Collaborator

+(status: do not review) while we discuss in Slack.

@jwnimmer-tri jwnimmer-tri added the status: defer ci CI will terminate early (saving the expense of unwanted builds) label Aug 15, 2025
@github-actions
Copy link
Copy Markdown

Thank you for your contribution. This pull request has been open for 180 days without activity and so is considered stale. It will be automatically closed in 30 days unless you comment or remove the "status: stale" label.

@github-actions github-actions Bot added the status: stale Will be automatically closed soon due to inactivity. label Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: defer ci CI will terminate early (saving the expense of unwanted builds) status: do not review status: stale Will be automatically closed soon due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants