0

I want to finish the collision detection with point cloud represented by Octrees. With the python-fcl lib, I tried the following code snippet by myself

x = np.random.random([5, 3])
y = np.random.random([5, 3])

object1 = fcl.OcTree(0.1).insertPointCloud(points=x)
object2 = fcl.OcTree(0.1).insertPointCloud(points=y)

t1 = fcl.Transform()
o1 = fcl.CollisionObject(object1, t1)

t2 = fcl.Transform()
o2 = fcl.CollisionObject(object2, t2)

request = fcl.DistanceRequest()
result = fcl.DistanceResult()

ret = fcl.distance(object1, object2, request, result)

However, I got the error like this

File "src/fcl/fcl.pyx", line 140, in fcl.fcl.CollisionObject.__cinit__ValueError

So far, there are no other examples of octree with python-fcl, even in official document.

Has anyone converted the point cloud to an Octree and completed collision detection?

Help would be greatly appreciated!

KKKmelody
  • 31
  • 4

1 Answers1

1

nah bro its something to do with your machine. try using replit.com for running your code or use jupyter notebooks. appreciate your code

sohi
  • 11
  • 3
  • Thank you for your comment, but I think you didn't understand what I meant – KKKmelody Oct 24 '22 at 11:23
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 27 '22 at 23:16