Cannot use FCL with ROS
Hello!
I am trying to use FCL with an Octree to perform obstacle detection. I downloaded the source code of FCL from github and performed the installation instructions:
mkdir build
cd build
cmake ..
This, I think, created a folder in usr/local/include/fcl with the installed library inside.
Now it was required to access it with ROS. For that, I added:
find_package(fcl REQUIRED)
${fcl_INCLUDE_DIRS}
target_link_libraries(obstacleDetection ${catkin_LIBRARIES} ${OCTOMAP_LIBRARIES} ${fcl_LIBRARY_DIRS} ${FCL_LIBRARIES})
to my CMakeLists.txt file.
It compiles with catkin_make, but when I add
#include "fcl/shape/geometric_shapes.h"
, for example, to my obstacleDetection.h, it shows a lot of errors, such as:
In file included from /usr/include/c++/5/cstdint:35:0,
from /usr/include/fcl/data_types.h:42,
from /usr/include/fcl/math/vec_3f.h:42,
from /usr/include/fcl/BV/AABB.h:42,
from /usr/include/fcl/collision_object.h:43,
from /usr/include/fcl/shape/geometric_shapes.h:42,
from /home/jpdelopes/ros_ws/src/prjc/src/../include/PrecisionAgriculture/obstacleDetection.h:27,
from /home/jpdelopes/ros_ws/src/prjc/src/obstacleDetection.cpp:6:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
(...)
/usr/include/fcl/data_types.h:48:14: error: ‘int64_t’ in namespace ‘std’ does not name a type
typedef std::int64_t FCL_INT64;
(...)
In file included from /usr/include/fcl/collision_object.h:44:0,
from /usr/include/fcl/shape/geometric_shapes.h:42,
from /home/jpdelopes/ros_ws/src/prjc/src/../include/PrecisionAgriculture/obstacleDetection.h:27,
from /home/jpdelopes/ros_ws/src/prjc/src/obstacleDetection.cpp:6:
/usr/include/fcl/math/transform.h:185:8: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex lock_;
Which are three different errors. I think that the FCL library is detected, right? I do not know how to solve these errors.
PS: I think that I have installed all of the FCL library dependencies.
Thank you in advance.