Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
loco-3d
Multicontact-api
Commits
50bdf623
Unverified
Commit
50bdf623
authored
Dec 09, 2021
by
Guilhem Saurel
Committed by
GitHub
Dec 09, 2021
Browse files
Merge pull request #25 from nim65s/devel
maintenance
parents
a65354d2
9d888d0f
Pipeline
#17106
passed with stage
in 2 minutes and 8 seconds
Changes
11
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
50bdf623
...
...
@@ -19,7 +19,6 @@ IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
SET
(
PROJECT_USE_CMAKE_EXPORT TRUE
)
ENDIF
(
NOT INSTALL_PYTHON_INTERFACE_ONLY
)
SET
(
CUSTOM_HEADER_DIR
"
${
PROJECT_NAME
}
"
)
SET
(
CMAKE_CXX_STANDARD 11
)
SET
(
CXX_DISABLE_WERROR TRUE
)
SET
(
DOXYGEN_USE_MATHJAX YES
)
...
...
@@ -32,28 +31,25 @@ INCLUDE(cmake/ide.cmake)
# Project definition
COMPUTE_PROJECT_ARGS
(
PROJECT_ARGS LANGUAGES CXX
)
PROJECT
(
${
PROJECT_NAME
}
${
PROJECT_ARGS
}
)
SET
(
CMAKE
_CXX_STANDARD
11
)
CHECK_MINIMAL
_CXX_STANDARD
(
11
ENFORCE
)
# Project dependencies
ADD_PROJECT_DEPENDENCY
(
pinocchio REQUIRED
PKG_CONFIG_REQUIRES
"pinocchio >= 2.0.0"
)
ADD_PROJECT_DEPENDENCY
(
ndcurves 1.0.0 REQUIRED
PKG_CONFIG_REQUIRES
"ndcurves >= 0.5.1"
)
ADD_PROJECT_DEPENDENCY
(
pinocchio REQUIRED
)
ADD_PROJECT_DEPENDENCY
(
ndcurves 1.0.0 REQUIRED
)
IF
(
NOT CURVES_WITH_PINOCCHIO_SUPPORT
)
MESSAGE
(
FATAL_ERROR
"you need to use a ndcurves version compiled with pinocchio support"
)
ENDIF
(
NOT CURVES_WITH_PINOCCHIO_SUPPORT
)
SET
(
BOOST_
COMPONENTS unit_test_framework serialization
)
ADD_PROJECT_DEPENDENCY
(
Boost REQUIRED
COMPONENTS unit_test_framework serialization
)
IF
(
BUILD_PYTHON_INTERFACE
)
FINDPYTHON
()
STRING
(
REGEX REPLACE
"-"
"_"
PY_NAME
${
CUSTOM_HEADER_DIR
}
)
ADD_PROJECT_DEPENDENCY
(
eigenpy REQUIRED PKG_CONFIG_REQUIRES
"eigenpy >= 1.6.12"
)
SET
(
BOOST_COMPONENTS
${
BOOST_COMPONENTS
}
python
)
SEARCH_FOR_BOOST_PYTHON
(
REQUIRED
)
ADD_PROJECT_DEPENDENCY
(
eigenpy REQUIRED
)
INCLUDE_DIRECTORIES
(
SYSTEM
${
PYTHON_INCLUDE_DIRS
}
)
STRING
(
REGEX REPLACE
"-"
"_"
PY_NAME
${
PROJECT_NAME
}
)
SET
(
${
PY_NAME
}
_INSTALL_DIR
${
PYTHON_SITELIB
}
/
${
PY_NAME
}
)
ENDIF
(
BUILD_PYTHON_INTERFACE
)
SEARCH_FOR_BOOST
()
INCLUDE_DIRECTORIES
(
SYSTEM
${
Boost_INCLUDE_DIRS
}
)
# Main Library
...
...
@@ -70,5 +66,3 @@ IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
ENDIF
(
NOT INSTALL_PYTHON_INTERFACE_ONLY
)
ADD_SUBDIRECTORY
(
bindings
)
ADD_SUBDIRECTORY
(
unittest
)
PKG_CONFIG_APPEND_BOOST_LIBS
(
serialization
)
bindings/python/CMakeLists.txt
View file @
50bdf623
...
...
@@ -17,7 +17,7 @@ ADD_LIBRARY(${PY_NAME} SHARED ${${PROJECT_NAME}_PYTHON_SOURCES} ${${PROJECT_NAME
ADD_SOURCE_GROUP
(
${
PROJECT_NAME
}
_PYTHON_SOURCES
)
TARGET_LINK_LIBRARIES
(
${
PY_NAME
}
${
PROJECT_NAME
}
${
Boost_SERIALIZATION_LIBRARIES
}
eigenpy::eigenpy
)
TARGET_LINK_LIBRARIES
(
${
PY_NAME
}
${
PROJECT_NAME
}
eigenpy::eigenpy
)
TARGET_LINK_BOOST_PYTHON
(
${
PY_NAME
}
)
SET_TARGET_PROPERTIES
(
${
PY_NAME
}
PROPERTIES LIBRARY_OUTPUT_DIRECTORY
${
PY_NAME
}
SOVERSION
${
PROJECT_VERSION
}
)
...
...
cmake
@
f9f19535
Compare
fb4c22c3
...
f9f19535
Subproject commit f
b4c22c319ec5320f9a85527eb1a4130954846f5
Subproject commit f
9f19535583faa2bb2ff21d97cb33f8ab7624d36
include/multicontact-api/CMakeLists.txt
View file @
50bdf623
...
...
@@ -24,6 +24,7 @@ SET(${PROJECT_NAME}_SCENARIO_HEADERS
SET
(
${
PROJECT_NAME
}
_PYTHON_HEADERS
bindings/python/fwd.hpp
bindings/python/geometry/ellipsoid.hpp
bindings/python/geometry/expose-geometry.hpp
bindings/python/geometry/linear-cone.hpp
...
...
include/multicontact-api/bindings/python/fwd.hpp
0 → 100644
View file @
50bdf623
#ifndef __multicontact_api_python_fwd_hpp__
#define __multicontact_api_python_fwd_hpp__
// Silence a warning about a deprecated use of boost bind by boost python
// at least fo boost 1.73 to 1.75
// ref. https://github.com/stack-of-tasks/tsid/issues/128
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#include
<boost/python.hpp>
#undef BOOST_BIND_GLOBAL_PLACEHOLDERS
#endif // ifndef __multicontact_api_python_utils_printable_hpp__
include/multicontact-api/bindings/python/geometry/ellipsoid.hpp
View file @
50bdf623
...
...
@@ -5,8 +5,8 @@
#define __multicontact_api_python_geometry_ellipsoid_hpp__
#include
<pinocchio/fwd.hpp>
#include
<boost/python.hpp>
#include
"multicontact-api/bindings/python/fwd.hpp"
#include
"multicontact-api/geometry/ellipsoid.hpp"
namespace
multicontact_api
{
...
...
include/multicontact-api/bindings/python/serialization/archive.hpp
View file @
50bdf623
...
...
@@ -4,7 +4,7 @@
#ifndef __multicontact_api_python_serialization_archive_hpp__
#define __multicontact_api_python_serialization_archive_hpp__
#include
<boost
/python.hpp
>
#include
"multicontact-api/bindings
/python
/fwd
.hpp
"
namespace
multicontact_api
{
namespace
python
{
...
...
include/multicontact-api/bindings/python/utils/printable.hpp
View file @
50bdf623
...
...
@@ -4,7 +4,7 @@
#ifndef __multicontact_api_python_utils_printable_hpp__
#define __multicontact_api_python_utils_printable_hpp__
#include
<boost
/python.hpp
>
#include
"multicontact-api/bindings
/python
/fwd
.hpp
"
namespace
multicontact_api
{
namespace
python
{
...
...
include/multicontact-api/serialization/archive.hpp
View file @
50bdf623
...
...
@@ -41,7 +41,7 @@ struct Serializable {
public:
/// \brief Loads a Derived object from a text file.
void
loadFromText
(
const
std
::
string
&
filename
)
throw
(
std
::
invalid_argument
)
{
void
loadFromText
(
const
std
::
string
&
filename
)
{
std
::
ifstream
ifs
(
filename
.
c_str
());
if
(
ifs
)
{
boost
::
archive
::
text_iarchive
ia
(
ifs
);
...
...
@@ -53,7 +53,7 @@ struct Serializable {
}
/// \brief Saved a Derived object as a text file.
void
saveAsText
(
const
std
::
string
&
filename
)
const
throw
(
std
::
invalid_argument
)
{
void
saveAsText
(
const
std
::
string
&
filename
)
const
{
std
::
ofstream
ofs
(
filename
.
c_str
());
if
(
ofs
)
{
boost
::
archive
::
text_oarchive
oa
(
ofs
);
...
...
@@ -65,7 +65,7 @@ struct Serializable {
}
/// \brief Loads a Derived object from an XML file.
void
loadFromXML
(
const
std
::
string
&
filename
,
const
std
::
string
&
tag_name
)
throw
(
std
::
invalid_argument
)
{
void
loadFromXML
(
const
std
::
string
&
filename
,
const
std
::
string
&
tag_name
)
{
assert
(
!
tag_name
.
empty
());
std
::
ifstream
ifs
(
filename
.
c_str
());
if
(
ifs
)
{
...
...
@@ -78,7 +78,7 @@ struct Serializable {
}
/// \brief Saved a Derived object as an XML file.
void
saveAsXML
(
const
std
::
string
&
filename
,
const
std
::
string
&
tag_name
)
const
throw
(
std
::
invalid_argument
)
{
void
saveAsXML
(
const
std
::
string
&
filename
,
const
std
::
string
&
tag_name
)
const
{
assert
(
!
tag_name
.
empty
());
std
::
ofstream
ofs
(
filename
.
c_str
());
if
(
ofs
)
{
...
...
@@ -91,7 +91,7 @@ struct Serializable {
}
/// \brief Loads a Derived object from an binary file.
void
loadFromBinary
(
const
std
::
string
&
filename
)
throw
(
std
::
invalid_argument
)
{
void
loadFromBinary
(
const
std
::
string
&
filename
)
{
std
::
ifstream
ifs
(
filename
.
c_str
());
if
(
ifs
)
{
boost
::
archive
::
binary_iarchive
ia
(
ifs
);
...
...
@@ -103,7 +103,7 @@ struct Serializable {
}
/// \brief Saved a Derived object as an binary file.
void
saveAsBinary
(
const
std
::
string
&
filename
)
const
throw
(
std
::
invalid_argument
)
{
void
saveAsBinary
(
const
std
::
string
&
filename
)
const
{
std
::
ofstream
ofs
(
filename
.
c_str
());
if
(
ofs
)
{
boost
::
archive
::
binary_oarchive
oa
(
ofs
);
...
...
unittest/CMakeLists.txt
View file @
50bdf623
...
...
@@ -12,7 +12,7 @@ SET(${PROJECT_NAME}_TESTS
FOREACH
(
TEST
${${
PROJECT_NAME
}
_TESTS
}
)
ADD_UNIT_TEST
(
${
TEST
}
"
${
TEST
}
.cpp"
)
TARGET_LINK_LIBRARIES
(
${
TEST
}
${
PROJECT_NAME
}
${
Boost
_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
${
TEST
}
${
PROJECT_NAME
}
Boost
::unit_test_framework
)
ENDFOREACH
(
TEST
${${
PROJECT_NAME
}
_TESTS
}
)
TARGET_COMPILE_DEFINITIONS
(
examples PRIVATE -DTEST_DATA_PATH=
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../examples/"
)
...
...
unittest/python/CMakeLists.txt
View file @
50bdf623
...
...
@@ -2,7 +2,7 @@ SET(${PROJECT_NAME}_PYTHON_TESTS
trivial
geometry
scenario
serialization_examples
#
serialization_examples
)
FOREACH
(
TEST
${${
PROJECT_NAME
}
_PYTHON_TESTS
}
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment