Commit 67c08e39 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

Merge branch 'export_plot' into 'devel'

Continue !42

See merge request loco-3d/curves!43
parents 879bb820 9a607113
......@@ -15,8 +15,8 @@ INCLUDE(cmake/python.cmake)
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
CMAKE_POLICY(SET CMP0048 OLD)
PROJECT(${PROJECT_NAME} CXX)
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
ADD_REQUIRED_DEPENDENCY(eigen3)
ADD_OPTIONAL_DEPENDENCY(pinocchio)
......
Subproject commit 54ece258eed16da94c7f10979588fcb47b744eb8
Subproject commit e7892518eb62e1d20823307af48d6041f78a8da4
SET(${PY_NAME}_BINDINGS_SOURCES
curves_python.cpp
optimization_python.cpp
optimization_python.h
python_variables.cpp
python_variables.h
namespace.cpp
namespace.h
)
ADD_SUBDIRECTORY(${PY_NAME})
ADD_LIBRARY(${PY_NAME} SHARED ${${PY_NAME}_BINDINGS_SOURCES})
SET_TARGET_PROPERTIES(${PY_NAME} PROPERTIES PREFIX "")
TARGET_COMPILE_OPTIONS(${PY_NAME} PRIVATE "-Wno-conversion")
PKG_CONFIG_USE_DEPENDENCY(${PY_NAME} eigenpy)
IF(CURVES_WITH_PINOCCHIO_SUPPORT)
PKG_CONFIG_USE_DEPENDENCY(${PY_NAME} pinocchio)
ENDIF(CURVES_WITH_PINOCCHIO_SUPPORT)
TARGET_LINK_LIBRARIES(${PY_NAME} ${Boost_LIBRARIES})
# MESSAGE(WARNING "Boost libraries are : ${Boost_LIBRARIES}")
IF(APPLE)
# We need to change the extension for python bindings
SET_TARGET_PROPERTIES(${PY_NAME} PROPERTIES SUFFIX ".so")
ENDIF(APPLE)
INSTALL(TARGETS ${PY_NAME} DESTINATION ${PYTHON_SITELIB}/${PY_NAME})
install (FILES plot/plot.py
deploy/__init__.py
DESTINATION ${PYTHON_SITELIB}/${PY_NAME})
install (FILES deploy/optimization/__init__.py
DESTINATION ${PYTHON_SITELIB}/${PY_NAME}/optimization)
PYTHON_INSTALL_ON_SITE(${PY_NAME} __init__.py)
PYTHON_INSTALL_ON_SITE(${PY_NAME} plot.py)
PYTHON_INSTALL_ON_SITE(${PY_NAME} optimization.py)
ADD_PYTHON_UNIT_TEST("python-curves" "python/test/test.py" "python")
ADD_PYTHON_UNIT_TEST("python-optimization" "python/test/optimization.py" "python")
......
SET(${PY_NAME}_BINDINGS_SOURCES
curves_python.cpp
optimization_python.cpp
optimization_python.h
python_variables.cpp
python_variables.h
namespace.cpp
namespace.h
)
ADD_LIBRARY(${PY_NAME} SHARED ${${PY_NAME}_BINDINGS_SOURCES})
SET_TARGET_PROPERTIES(${PY_NAME} PROPERTIES PREFIX "")
TARGET_COMPILE_OPTIONS(${PY_NAME} PRIVATE "-Wno-conversion")
PKG_CONFIG_USE_DEPENDENCY(${PY_NAME} eigenpy)
IF(CURVES_WITH_PINOCCHIO_SUPPORT)
PKG_CONFIG_USE_DEPENDENCY(${PY_NAME} pinocchio)
ENDIF(CURVES_WITH_PINOCCHIO_SUPPORT)
TARGET_LINK_LIBRARIES(${PY_NAME} ${Boost_LIBRARIES})
# MESSAGE(WARNING "Boost libraries are : ${Boost_LIBRARIES}")
IF(APPLE)
# We need to change the extension for python bindings
SET_TARGET_PROPERTIES(${PY_NAME} PROPERTIES SUFFIX ".so")
ENDIF(APPLE)
INSTALL(TARGETS ${PY_NAME} DESTINATION ${PYTHON_SITELIB}/${PY_NAME})
......@@ -2,6 +2,4 @@
# Copyright (c) 2019 CNRS
# Author : Steve Tonneau
from curves import *
import plot
from .curves import *
......@@ -2,4 +2,4 @@
# Copyright (c) 2019 CNRS
# Author : Steve Tonneau
from curves.curves.optimization import *
from .curves.optimization import *
import eigenpy
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
from numpy import array
from curves import bezier
from .curves import bezier
eigenpy.switchToNumpyArray()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment