I have converted my 3d numpy array to a 3d volumetric grid but how do i convert it to a world such that voxels with labels 1 and 3 are obstacles?
To use this as an obstacle geometry, you could create a VolumeGrid with a 1 where the obstacles exist, and a -1 where they do not. Then, you could call
grid_geometry = Geometry3D(grid)
then set up a collision detection subroutine that checks collision with each robot link:
for i in range(robot.numLinks()):
if grid_geometry.collides(robot.link(i).geometry()):
print("collides")
return True
return False