Collision checking with Python-fcl
Hi,
I was able to successfully install python-fcl. I used a couple of different ways to do this and was able to install the library. But I am not able to detect collisions. This leads me to believe that maybe the way I set things up are broken. Here are the following things I did:
- brew installed libccd, octomap, fcl then cloned the python-fcl repo and checkout out the pull-request for the fcl version 0.6.1
- brew installed libccd, octomap, cloned fcl, checked out version 0.5.0 and built it using cmake -> make -> make install and pip installed python-fcl
- brew installed libccd cloned octomap and built it using cmake -> make -> make install, cloned fcl and built it the same way then pip installed python-fcl
All threw methods allowed me import fcl into my python script. Here is the test script I wrote: `import numpy as np import fcl
b = fcl.Box(15,15,15) v1 = np.array([1.0, 1.0, 1.0]) v2 = np.array([1.0, 1.0, 2.0]) v3 = np.array([1.0, 2.0, 1.0]) t = fcl.TriangleP(v1, v2, v3)
obj1 = fcl.CollisionObject(b) obj2 = fcl.CollisionObject(t)
objs = [obj1, obj2]
manager = fcl.DynamicAABBTreeCollisionManager() manager.registerObjects(objs) manager.setup()
crequest = fcl.CollisionRequest(num_max_contacts=100, enable_contact=True) cdata = fcl.CollisionData(crequest, fcl.CollisionResult())
manager.collide(cdata, fcl.defaultCollisionCallback)
print('Collision within manager 1?: {}'.format(cdata.result.is_collision))`
Here is the output that I get when I run this:
Warning: collision function between node type 9 and node type 18 is not supported Collision within manager 1?: False
I am currently trying to force the script to detect a collision. I am not sure what I am doing wrong. I believe that the installation was not successful and as a result the collision detection is not working properly. I am extremely new to all of this and any advice would be really helpful.
Some additional information: I am currently on macOS Big Sur (11.3) on a MacBook Pro 2015 Homebrew version 3.1.6 boost 1.75.0_3 Cython 0.29.23 eigen 3.3.9 fcl 0.5.0 when cloning and 0.6.1 when brew installing icu4c 69.1 libccd 2.1_1 octomap 1.9.7