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
Stack Of Tasks
pinocchio
Commits
86d6517d
Verified
Commit
86d6517d
authored
Jun 15, 2020
by
Justin Carpentier
Browse files
core: fix packaging of autodiff and codegen plugins
parent
47ae2f83
Changes
7
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
86d6517d
...
...
@@ -114,25 +114,13 @@ IF(BUILD_WITH_AUTODIFF_SUPPORT)
# Check first CppADCodeGen
IF
(
BUILD_WITH_CODEGEN_SUPPORT
)
ADD_PROJECT_DEPENDENCY
(
cppadcg 2.4.1 REQUIRED PKG_CONFIG_REQUIRES
"cppadcg >= 2.4.1"
)
# CppADCodeGen 2.4.1 is the first version to check the minimal version of CppAD
IF
(
CPPADCG_FOUND AND BUILD_WITH_CODEGEN_SUPPORT
)
ADD_DEFINITIONS
(
-DPINOCCHIO_WITH_CPPADCG_SUPPORT
)
PKG_CONFIG_APPEND_CFLAGS
(
"-DPINOCCHIO_WITH_CPPADCG_SUPPORT"
)
ENDIF
(
CPPADCG_FOUND AND BUILD_WITH_CODEGEN_SUPPORT
)
ENDIF
(
BUILD_WITH_CODEGEN_SUPPORT
)
ADD_PROJECT_DEPENDENCY
(
cppad 20180000.0 REQUIRED PKG_CONFIG_REQUIRES
"cppad >= 20180000.0"
)
ADD_DEFINITIONS
(
-DPINOCCHIO_WITH_CPPAD_SUPPORT
)
PKG_CONFIG_APPEND_CFLAGS
(
"-DPINOCCHIO_WITH_CPPAD_SUPPORT"
)
IF
(
NOT
${
EIGEN3_VERSION
}
VERSION_GREATER
"3.3.0"
)
ADD_DEFINITIONS
(
-DPINOCCHIO_CPPAD_REQUIRES_MATRIX_BASE_PLUGIN
)
PKG_CONFIG_APPEND_CFLAGS
(
"-DPINOCCHIO_CPPAD_REQUIRES_MATRIX_BASE_PLUGIN"
)
ENDIF
(
NOT
${
EIGEN3_VERSION
}
VERSION_GREATER
"3.3.0"
)
ENDIF
(
BUILD_WITH_AUTODIFF_SUPPORT
)
IF
(
BUILD_WITH_CASADI_SUPPORT
)
ADD_PROJECT_DEPENDENCY
(
casadi 3.4.5 REQUIRED PKG_CONFIG_REQUIRES
"casadi >= 3.4.5"
)
ADD_DEFINITIONS
(
-DPINOCCHIO_WITH_CASADI_SUPPORT
)
PKG_CONFIG_APPEND_CFLAGS
(
"-DPINOCCHIO_WITH_CASADI_SUPPORT"
)
ENDIF
(
BUILD_WITH_CASADI_SUPPORT
)
SET
(
BOOST_REQUIRED_COMPONENTS filesystem serialization system
)
...
...
src/algorithm/aba.hxx
View file @
86d6517d
//
// Copyright (c) 2016-20
19
CNRS, INRIA
// Copyright (c) 2016-20
20
CNRS, INRIA
//
#ifndef __pinocchio_aba_hxx__
#define __pinocchio_aba_hxx__
#ifdef PINOCCHIO_WITH_CPPAD_SUPPORT
#include "pinocchio/autodiff/cppad.hpp"
#endif
#include "pinocchio/spatial/act-on-set.hpp"
#include "pinocchio/multibody/visitor.hpp"
#include "pinocchio/algorithm/check.hpp"
...
...
src/autodiff/casadi.hpp
View file @
86d6517d
...
...
@@ -5,6 +5,8 @@
#ifndef __pinocchio_autodiff_casadi_hpp__
#define __pinocchio_autodiff_casadi_hpp__
#define PINOCCHIO_WITH_CASADI_SUPPORT
#include "pinocchio/math/fwd.hpp"
#include <casadi/casadi.hpp>
...
...
src/autodiff/cppad.hpp
View file @
86d6517d
...
...
@@ -2,19 +2,18 @@
// Copyright (c) 2018-2020 CNRS INRIA
//
#ifndef __pinocchio_autodiff_c
c
pad_hpp__
#define __pinocchio_autodiff_c
c
pad_hpp__
#ifndef __pinocchio_autodiff_c
p
pad_hpp__
#define __pinocchio_autodiff_c
p
pad_hpp__
#include "pinocchio/math/fwd.hpp"
#define PINOCCHIO_WITH_CPPAD_SUPPORT
// Do not include this file directly.
// Copy and use directly the intructions from <cppad/example/cppad_eigen.hpp>
// to avoid redifinition of EIGEN_MATRIXBASE_PLUGIN for Eigen 3.3.0 and later
//#include <cppad/example/cppad_eigen.hpp>
#ifdef PINOCCHIO_CPPAD_REQUIRES_MATRIX_BASE_PLUGIN
#define EIGEN_MATRIXBASE_PLUGIN <cppad/example/eigen_plugin.hpp>
#endif
#define EIGEN_MATRIXBASE_PLUGIN <pinocchio/autodiff/cppad/math/eigen_plugin.hpp>
#include <cppad/cppad.hpp>
#include <Eigen/Dense>
...
...
@@ -178,4 +177,4 @@ namespace pinocchio
#include "pinocchio/autodiff/cppad/utils/static-if.hpp"
#include "pinocchio/autodiff/cppad/math/quaternion.hpp"
#endif // #ifndef __pinocchio_autodiff_c
c
pad_hpp__
#endif // #ifndef __pinocchio_autodiff_c
p
pad_hpp__
src/autodiff/cppad/math/eigen_plugin.hpp
0 → 100644
View file @
86d6517d
#if !EIGEN_VERSION_AT_LEAST(3,3,3)
typedef
Scalar
value_type
;
#endif
src/codegen/code-generator-base.hpp
View file @
86d6517d
//
// Copyright (c) 2018
CNRS
// Copyright (c) 2018
-2020 CNRS INRIA
//
#ifndef __pinocchio_utils_code_generator_base_hpp__
...
...
@@ -10,8 +10,6 @@
#include "pinocchio/multibody/model.hpp"
#include "pinocchio/multibody/data.hpp"
#ifdef PINOCCHIO_WITH_CPPADCG_SUPPORT
namespace
pinocchio
{
...
...
@@ -178,6 +176,4 @@ namespace pinocchio
}
// namespace pinocchio
#endif // PINOCCHIO_WITH_CPPADCG_SUPPORT
#endif // ifndef __pinocchio_utils_code_generator_base_hpp__
src/codegen/cppadcg.hpp
View file @
86d6517d
...
...
@@ -5,6 +5,8 @@
#ifndef __pinocchio_codegen_ccpadcg_hpp__
#define __pinocchio_codegen_ccpadcg_hpp__
#define PINOCCHIO_WITH_CPPADCG_SUPPORT
#include "pinocchio/math/fwd.hpp"
#include <cmath>
...
...
Write
Preview
Markdown
is supported
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