How to create a collision object from a (convex) mesh #422
manuel-koch
started this conversation in
General
Replies: 2 comments
-
I tried this, but it crashes import hppfcl as fcl
mesh = Trimesh(
vertices=extended_3d_data.vertices,
faces=extended_3d_data.faces,
)
if mesh.is_convex:
fs = numpy.concatenate(
(3 * numpy.ones((len(mesh.faces), 1), dtype=numpy.int64), mesh.faces), axis=1
)
return fcl.Convex(mesh.vertices, len(fs), fs.flatten())
else:
bvh = fcl.BVHModelOBB()
bvh.beginModel(len(mesh.faces), len(mesh.vertices))
bvh.addSubModel(
verts=numpy.array(mesh.vertices),
triangles=numpy.array(mesh.faces),
)
bvh.endModel()
return bvh > bvh.addSubModel(
verts=numpy.array(mesh.vertices),
triangles=numpy.array(mesh.faces),
)
E Boost.Python.ArgumentError: Python argument types in
E BVHModelBase.addSubModel(BVHModelOBB)
E did not match C++ signature:
E addSubModel(hpp::fcl::BVHModelBase {lvalue}, std::__1::vector<Eigen::Matrix<double, 3, 1, 0, 3, 1>, std::__1::allocator<Eigen::Matrix<double, 3, 1, 0, 3, 1>>>)
E addSubModel(hpp::fcl::BVHModelBase {lvalue}, std::__1::vector<Eigen::Matrix<double, 3, 1, 0, 3, 1>, std::__1::allocator<Eigen::Matrix<double, 3, 1, 0, 3, 1>>>, std::__1::vector<hpp::fcl::Triangle, std::__1::allocator<hpp::fcl::Triangle>>)
../poc_runner/collision_detection/hpp_fcl.py:134: ArgumentError |
Beta Was this translation helpful? Give feedback.
0 replies
-
Mentioned in ticket #423 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm new to hpp-fcl and can't find useful documentation about the python interface.
There seem to be some c++ code examples ( mostly doxygen stuff ) but I have difficulties converting them to python.
I'm trying to replicate some functionality from the original fcl library.
In their example they have something like
How would that look like for hpp-fcl ?
Thank you for helping getting starting with hpp-fcl.
Beta Was this translation helpful? Give feedback.
All reactions