epfl-lasa / control-libraries

A collection of library modules to facilitate the creation of full control loop algorithms, including state representation, motion planning, kinematics, dynamics and control.
https://epfl-lasa.github.io/control-libraries
GNU General Public License v3.0
27 stars 2 forks source link

Pinocchio-Boost Problems #120

Closed domire8 closed 1 year ago

domire8 commented 3 years ago

So as I was trying to have a ROS node publishing and subscribing for a demo, I ran into the same issue as @patr3 (the one he never created an issue for :smile:). I'm not gonna copy the whole error message, but it's (normally) easily reproducible when checking out feature/ros-publisher-subscriber and try to run run-demo.sh in demos/ros_examples.

I mark this as a bug because I think it's important we solve this issue in the near future.

domire8 commented 3 years ago

Update 1: if you include #include <pinocchio/container/boost-container-limits.hpp> at the top of the source file (task_space_control_loop.cpp), the issue doesn't come up and the catkin_make succeeds

domire8 commented 3 years ago

Update 2: If you include the same header in robot_model/Model.hpp, and not in task_space_control_loop.cpp, catkin_make fails again

domire8 commented 3 years ago

Update 3: If you include the header in both robot_model/Model.hpp and task_space_control_loop.cpp, catkin_make succeeds. If however, the include comes after the #include <ros/ros.h> catkin_make fails again.

patr3 commented 3 years ago

wait. I have solve it

patr3 commented 3 years ago

add this at your CMakeFile

find_package(Boost REQUIRED COMPONENTS system)
add_compile_definitions(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS)
add_compile_definitions(BOOST_MPL_LIMIT_LIST_SIZE=30)
patr3 commented 3 years ago

@domire8 I have never created the issue because I have solved it and to solve it I did in my code and not in the one of control library.

domire8 commented 3 years ago

@patr3 i'd prefer to solve it here, thats why I'm investigating it

patr3 commented 3 years ago

@domire8 the following code in the CMakeFile.txt of the repository where you use the control library

find_package(Boost REQUIRED COMPONENTS system)
add_compile_definitions(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS)
add_compile_definitions(BOOST_MPL_LIMIT_LIST_SIZE=30)
patr3 commented 3 years ago

look the following file: https://github.com/epfl-lasa/franka_ros_gazebo/blob/development/robot_gazebo/CMakeLists.txt