Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

how to convert 3d volumetric grid into a world? #37

#1

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?

  • replies 1
  • views 958
  • likes 0
#2

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