Pinocchio PyBind11 helpers

This package provides utilities to ease the use of Pinocchio objects when using PyBind11. There are two methods:

  1. The developer-friendly but likely less user-friendly method: PINOCCHIO_PYBIND11_TYPE_CASTER
  2. 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

to get some Predefined casters.

Example

#define SCALAR double
#define OPTIONS 0
#define JOINT_MODEL_COLLECTION ::pinocchio::JointCollectionDefaultTpl
...
// method 1
m.def("function", my_function);
// method 2
m.def("function", pinocchio::python::make_pybind11_function(my_function));
pinocchio::python::make_pybind11_function
internal::function_wrapper< R(*)(Args...)> make_pybind11_function(R(*func)(Args...))
Creates a function wrapper.
Definition: pybind11.hpp:185
test-cpp2pybind11.m
m
Definition: test-cpp2pybind11.py:25
pybind11-all.hpp


pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:37