C++ API
Pinocchio PyBind11 helpers
This package provides utilities to ease the use of Pinocchio objects when using PyBind11. There are two methods:
The developer-friendly but likely less user-friendly method: PINOCCHIO_PYBIND11_TYPE_CASTER
The user-friendly but less developer-friendly method: pinocchio::python::make_pybind11_function
Both methods can be mixed. For both cases, you may
// with necessary #define. See below
#include <pinocchio/bindings/python/pybind11-all.hpp>
Example
#define SCALAR double
#define OPTIONS 0
#define JOINT_MODEL_COLLECTION ::pinocchio::JointCollectionDefaultTpl
#include <pinocchio/bindings/python/pybind11-all.hpp>
...
// method 1
m.def("function", my_function);
// method 2
m.def("function", pinocchio::python::make_pybind11_function(my_function));