Visualize VoxelCollisionMap in Meshcat#22657
Draft
siddancha wants to merge 20 commits intoRobotLocomotion:masterfrom
Draft
Visualize VoxelCollisionMap in Meshcat#22657siddancha wants to merge 20 commits intoRobotLocomotion:masterfrom
siddancha wants to merge 20 commits intoRobotLocomotion:masterfrom
Conversation
Collaborator
|
+(status: do not review) while we discuss in Slack. |
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a native Meshcat visualization of
planning::VoxelCollisionMapusing THREE.js' InstancedMesh of BoxGeometries.internal::InstancedMeshDatato msgpack and setInstancedMeshobjects in Meshcat.SetObject(BoxList)to set a list of boxes as anInstancedMeshobject.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:
planning/devpublicly 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 asmeshcat_manual_test) to manually visualize a VoxelCollisionMap in Meshcat.Run:
bazel test //geometry:meshcat_voxel_grid_manual_testA 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