diff --git a/include/sot-dynamic-pinocchio/dynamic-pinocchio.h b/include/sot-dynamic-pinocchio/dynamic-pinocchio.h index 5d0e6d8aec48a8de3d32364d8574de0d9994b33e..3f90dc564beaa6a077b68a4844b1b9a044a2693e 100644 --- a/include/sot-dynamic-pinocchio/dynamic-pinocchio.h +++ b/include/sot-dynamic-pinocchio/dynamic-pinocchio.h @@ -29,8 +29,6 @@ /* STD */ #include <string> #include <map> -/* Matrix */ -#include <dynamic-graph/linear-algebra.h> /* SOT */ #include <sot/core/flags.hh> @@ -40,6 +38,8 @@ #include <dynamic-graph/signal-time-dependent.h> #include <sot/core/exception-dynamic.hh> #include <sot/core/matrix-geometry.hh> +/* Matrix */ +#include <dynamic-graph/linear-algebra.h> /* PINOCCHIO */ #include <pinocchio/macros.hpp> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c8df282a9224158bbfca8758ac22a8a4ea167544..cf18b805849659b4e505d4d0da165508985a8c51 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -61,6 +61,17 @@ FOREACH(lib ${plugins}) UNSET({libname}) ENDFOREACH(lib) +IF(BUILD_PYTHON_INTERFACE) + DYNAMIC_GRAPH_PYTHON_MODULE("sot/dynamics_pinocchio/dynamic" + "" + dynamic-wrap-python + 1 + "src/python-module-py.cpp" + ) + PKG_CONFIG_USE_DEPENDENCY(dynamic-wrap-python pinocchio) +ENDIF(BUILD_PYTHON_INTERFACE) + + # Main Library ADD_LIBRARY(${LIBRARY_NAME} SHARED sot-dynamic-pinocchio.cpp) TARGET_LINK_LIBRARIES(${LIBRARY_NAME} pinocchio) diff --git a/src/python-module-py.cpp b/src/python-module-py.cpp index bb25fb2799511d06f207a68bb0b10fd864ef377c..d0cfedcc7b1c8647203f1357bd735f330f5bbdfa 100644 --- a/src/python-module-py.cpp +++ b/src/python-module-py.cpp @@ -13,8 +13,10 @@ // You should have received a copy of the GNU Lesser General Public License // along with sot-dynamic-pinocchio. If not, see <http://www.gnu.org/licenses/>. -#include <Python.h> +#include <sot/core/debug.hh> + #include <sot-dynamic-pinocchio/dynamic-pinocchio.h> +#include <Python.h> #include <boost/python.hpp> #include <typeinfo> #include <cstdio>