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

Add testing of Python bindings #193

Open
jcarpent opened this issue Sep 18, 2020 · 5 comments
Open

Add testing of Python bindings #193

jcarpent opened this issue Sep 18, 2020 · 5 comments
Assignees

Comments

@jcarpent
Copy link
Contributor

To enforce coverage of this package, it would be nice to also test the Python bindings. Unfortunately I don’t have time to do it. @nim65s Would you be available to do this task?

@nim65s
Copy link
Contributor

nim65s commented Sep 18, 2020

Yes, I can do it. But I can't give delays yet. Let's assign this to me, but if anyone want to do it faster, please tell it and go ahead :)

@nim65s nim65s self-assigned this Sep 18, 2020
@jcarpent
Copy link
Contributor Author

Thanks for quick answer.

@manuel-koch
Copy link

It would be nice if this testing code could serve as examples on how to use the python bindings.
The current documentation of the python stuff is rather poor.

@jcarpent
Copy link
Contributor Author

@manuel-koch Could you help us in this task by adding some examples taken from your ongoing work?

@manuel-koch
Copy link

manuel-koch commented May 16, 2023

I'm currently searching for ways to use stuff like the following pseudo code together with numpy, pyrr and trimesh.

import hppfcl as fcl

fcl.Box()
fcl.Sphere()
fcl.Cylinder()

fcl.Transform3f()

fcl.BVHModelOBB()
fcl.BVHModelOBBRSS()

# for non-convex meshes
bvh = fcl.BVHModelOBB()
bvh.beginModel(....)
bvh.addSubModel(...)
bvh.endModel()

# for convex meshes
fcl.Convex(....)

manager = fcl.DynamicAABBTreeCollisionManager()
manager = fcl.BroadPhaseCollisionManager()

collision_object = fcl.CollisionObject(geometry, transform)
manager.registerObject(collision_object)

callback = fcl.CollisionCallBackDefault()
result = manager.collide(callback)

In the end I want to achieve something similar to how trimesh uses fcl to find collisions

  • objects within a manager
  • object vs objects in manager
  • objects in two managers

see https://github.com/mikedh/trimesh/blob/main/trimesh/collision.py

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

3 participants