Open nachovizzo opened 3 years ago
I would be interesting in this too. I bumped into this issue several time. https://github.com/stack-of-tasks/pinocchio/pull/1519 is the results of my vagrancy.
For your info, the type caster can solve your problem if you accept copies. There is an example in the above mentioned PR.
Problem Descriptiopn
Hello there, I'm actually using a 3dparty library that provides python bindings... but sadly they didn't use
pybind11
:cry: ...I need to interact with the python objects created by the library(from Python) with a C++ API. So far I made it work but I don't like at all how it's looking:
PyObject*
, basically anything created from a python sessionboost::pyton
as an extra dependencySolution provided so far
What I would like to write:
An extra example
So, I use a lot of the Open3D library. And whenever I write C++ code it just works out of the box with Open3D types:
Whenever I build that small module I can run the following code
If I don't use the right
o3d.geometry.PointCloud()
type, then there will be a runtime errorWhich is the expected behavior.
Final Question
I've checked the Custom type caters but doesn't seem to be the right solution.
Is there any easy way to achieve this?
Thanks in advance!!!