Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collision checking with Python-fcl #27

Open
Keshav919 opened this issue May 12, 2021 · 0 comments
Open

Collision checking with Python-fcl #27

Keshav919 opened this issue May 12, 2021 · 0 comments

Comments

@Keshav919
Copy link

Keshav919 commented May 12, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant