Skip to content

Commit 70b2879

Browse files
committed
include pinocchio before boost
1 parent 59a75dc commit 70b2879

File tree

3 files changed

+11
-53
lines changed

3 files changed

+11
-53
lines changed

include/sot/core/robot-utils.hh

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,43 +12,16 @@
1212
/* --- INCLUDE --------------------------------------------------------- */
1313
/* --------------------------------------------------------------------- */
1414

15-
/** pinocchio is forcing the BOOST_MPL_LIMIT_VECTOR_SIZE to a specific value.
16-
This happen to be not working when including the boost property_tree
17-
library. For this reason if defined, the current value of
18-
BOOST_MPL_LIMIT_VECTOR_SIZE is saved in the preprocessor stack and unset.
19-
Once the property_tree included the pinocchio value of this variable is
20-
restored.
21-
*/
22-
23-
#ifdef BOOST_MPL_LIMIT_VECTOR_SIZE
24-
#pragma push_macro("BOOST_MPL_LIMIT_VECTOR_SIZE")
25-
#define UNDEF_BOOST_MPL_LIMIT_VECTOR_SIZE
26-
#undef BOOST_MPL_LIMIT_VECTOR_SIZE
27-
#endif
15+
#include <map>
2816

29-
#ifdef BOOST_MPL_LIMIT_LIST_SIZE
30-
#pragma push_macro("BOOST_MPL_LIMIT_LIST_SIZE")
31-
#define UNDEF_BOOST_MPL_LIMIT_LIST_SIZE
32-
#undef BOOST_MPL_LIMIT_LIST_SIZE
33-
#endif
17+
#include <pinocchio/fwd.hpp>
3418

19+
#include <boost/assign.hpp>
3520
#include <boost/property_tree/ptree.hpp>
3621

37-
#ifdef UNDEF_BOOST_MPL_LIMIT_VECTOR_SIZE
38-
#pragma pop_macro("BOOST_MPL_LIMIT_VECTOR_SIZE")
39-
#undef UNDEF_BOOST_MPL_LIMIT_VECTOR_SIZE
40-
#endif
41-
42-
#ifdef UNDEF_BOOST_MPL_LIMIT_LIST_SIZE
43-
#pragma pop_macro("BOOST_MPL_LIMIT_LIST_SIZE")
44-
#undef UNDEF_BOOST_MPL_LIMIT_LIST_SIZE
45-
#endif
46-
47-
#include "boost/assign.hpp"
4822
#include <dynamic-graph/linear-algebra.h>
4923
#include <dynamic-graph/logger.h>
5024
#include <dynamic-graph/signal-helper.h>
51-
#include <map>
5225
#include <sot/core/matrix-geometry.hh>
5326

5427
namespace dynamicgraph {

src/tools/parameter-server.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,14 @@
1414
* with sot-torque-control. If not, see <http://www.gnu.org/licenses/>.
1515
*/
1616

17-
/** pinocchio is forcing the BOOST_MPL_LIMIT_VECTOR_SIZE to a specific value.
18-
This happen to be not working when including the boost property_tree
19-
library. For this reason if defined, the current value of
20-
BOOST_MPL_LIMIT_VECTOR_SIZE is saved in the preprocessor stack and unset.
21-
Once the property_tree included the pinocchio value of this variable is
22-
restored.
23-
*/
17+
#include <iostream>
18+
19+
#include <pinocchio/fwd.hpp>
2420

25-
#ifdef BOOST_MPL_LIMIT_VECTOR_SIZE
26-
#pragma push_macro("BOOST_MPL_LIMIT_VECTOR_SIZE")
27-
#undef BOOST_MPL_LIMIT_VECTOR_SIZE
28-
#include <boost/property_tree/ptree.hpp>
29-
#pragma pop_macro("BOOST_MPL_LIMIT_VECTOR_SIZE")
30-
#else
3121
#include <boost/property_tree/ptree.hpp>
32-
#endif
3322

3423
#include <dynamic-graph/all-commands.h>
3524
#include <dynamic-graph/factory.h>
36-
#include <iostream>
3725
#include <sot/core/debug.hh>
3826
#include <sot/core/exception-tools.hh>
3927
#include <sot/core/parameter-server.hh>

src/tools/robot-utils-py.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@
44
* This file is part of sot-core.
55
* See license file.
66
*/
7-
#ifdef BOOST_MPL_LIMIT_VECTOR_SIZE
8-
#pragma push_macro("BOOST_MPL_LIMIT_VECTOR_SIZE")
9-
#undef BOOST_MPL_LIMIT_VECTOR_SIZE
10-
#include <boost/property_tree/ptree.hpp>
11-
#pragma pop_macro("BOOST_MPL_LIMIT_VECTOR_SIZE")
12-
#else
13-
#include <boost/property_tree/ptree.hpp>
14-
#endif
157

8+
#include <pinocchio/fwd.hpp>
9+
10+
#include <boost/property_tree/ptree.hpp>
1611
#include <boost/python.hpp>
1712
#include <boost/python/suite/indexing/map_indexing_suite.hpp>
13+
1814
#include <sot/core/robot-utils.hh>
15+
1916
using namespace boost::python;
2017
using namespace dynamicgraph::sot;
2118

0 commit comments

Comments
 (0)