We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, I am testing python-fcl for using in collision detection. I 'm getting wrong results from library using this code example:
import numpy as np import fcl # Cylinder geometry displaced geom1 = fcl.Cylinder(1.0, 4.0) obj1 = fcl.CollisionObject(geom1) obj1.setTranslation(np.array([0.5, 2, 1.0])) # Same cylinder geometry rotated around x axis 90 degrees and displaced geom2 = fcl.Cylinder(1.0, 4) obj2 = fcl.CollisionObject(geom2) obj2.setRotation(np.array([[ 1.,0. ,0.],[ 0., 0., 1.],[ 0., -1., 0.]])) obj2.setTranslation(np.array([0.5, -1.1, 2])) # Check collision request = fcl.CollisionRequest(num_max_contacts=1, enable_contact=True) result = fcl.CollisionResult() cdata = fcl.CollisionData(request, result) ret = fcl.collide(obj1, obj2, request, result) # Print results print('Collision?: ','No' if ret==0 else 'Yes') print([x.pos for x in cdata.result.contacts])
Here I show the objects drawn in FreeCAD:
However python-fcl indicates that there is no collision. ¿could it my mistake with code values?
Thank you for your awesome piece of code, Dani.
The text was updated successfully, but these errors were encountered:
Sorry, It was my error. I made a mistake when moving objects in FreeCAD.
Sorry, something went wrong.
No branches or pull requests
Hello, I am testing python-fcl for using in collision detection.
I 'm getting wrong results from library using this code example:
Here I show the objects drawn in FreeCAD:
However python-fcl indicates that there is no collision. ¿could it my mistake with code values?
Thank you for your awesome piece of code,
Dani.
The text was updated successfully, but these errors were encountered: