pinocchio  3.7.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
 
Loading...
Searching...
No Matches
registration.hpp
1//
2// Copyright (c) 2019-2020 INRIA
3//
4
5#ifndef __pinocchio_python_utils_registration_hpp__
6#define __pinocchio_python_utils_registration_hpp__
7
8#include <eigenpy/registration.hpp>
9
10namespace pinocchio
11{
12 namespace python
13 {
14
15 template<typename T>
16 inline bool register_symbolic_link_to_registered_type()
17 {
18 namespace bp = boost::python;
19 if (eigenpy::check_registration<T>())
20 {
21 const bp::type_info info = bp::type_id<T>();
22 const bp::converter::registration * reg = bp::converter::registry::query(info);
23 bp::handle<> class_obj(bp::borrowed(reg->get_class_object()));
24 bp::scope().attr(reg->get_class_object()->tp_name) = bp::object(class_obj);
25 return true;
26 }
27
28 return false;
29 }
30
31 } // namespace python
32} // namespace pinocchio
33
34#endif // ifndef __pinocchio_python_utils_registration_hpp__
Main pinocchio namespace.
Definition treeview.dox:11