using pybind11 along with catkin

asked 2018-11-01 09:34:33 -0500

vincent78 gravatar image

Hi,

I am trying to create a python wrapper over a library generated in a catkin package.

This library links against libraries generated by other catkin packages and imported via :

find_package(catkin REQUIRED COMPONENTS <...> )

I am trying to use pybind11.

Either when using the cmake method:

https://github.com/pybind/cmake_example

or using the python method

https://github.com/pybind/python_example

I end up wither with an error that catkin_package is unknown or the linkage to the other catkin package libraries not working.

I looked everywhere for an example of a catkin_package using pybind11, but failed to find one.

edit retag flag offensive close merge delete

Comments

I end up wither with an error that catkin_package is unknown or the linkage to the other catkin package libraries not working.

please include the actual error text in your question instead of paraphrasing it.

Also: show us what you tried. We cannot guess what you did.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-01 09:50:02 -0500 )edit

I am not sure that would help, I tried many things for hours, and there would be pages of cmake/python codes and logs of errors. I had no clue what I was doing. I do not know how to relate the content of ${catkin_LIBRARIES} and ${catkin_INCLUDE_DIRS} to either setup.py or to pybind11_add_module.

vincent78 gravatar image vincent78  ( 2018-11-01 11:41:38 -0500 )edit

Then I'm not sure readers here will be able to help you.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-01 12:22:14 -0500 )edit

this is one of the example using pybind11 with ros package: https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python

naveedhd gravatar image naveedhd  ( 2018-11-30 04:45:22 -0500 )edit