Closed iamyoukou closed 7 years ago
Hi iamyoukou,
It is my fault that I forget to list the fcl version. I have tried different versions of fcl libraries, and find out the version tags/0.3.3 should work. So there is the solution: git clone https://github.com/flexible-collision-library/fcl.git git checkout tags/0.3.3 I have mentioned it in readme now #2
Thanks, man! And I just found another way to fix my problem.
constexpr
is used in C++11, so I put set (CMAKE_CXX_STANDARD 11)
in voxelizer/CMakeLists.txt
. (CMake >= 3.1)
After 1., some errors about box_p
(voxelizer/src/commons.h) and model_p
(voxelizer/test/collisionChecker.h) will appear. To fix these two, I changed:
(1) in commons.h
typedef boost::shared_ptr<Box> box_p
-> typedef std::shared_ptr<Box> box_p
I installed fcl
(version 0.5.0) using Macports
;
And I found that in this version (maybe just on MacOSX 10.11.6?), the CollisionObject
class uses std::
in its constructor std::shared_ptr<CollisionGeometry>
, instead of boost::
.
(2) in collisionChecker.h
typedef boost::shared_ptr<Model> model_p
-> typedef std::shared_ptr<Model> model_p
Same reason as in (1).
Then, I built voxelizer
successfully. And it works nice.
Great to hear that ;) It seems that your version of libfcl uses the std::shared_ptr, and my library uses boost::shared_ptr. Thanks for providing a new solution ;p
Hi, when I
make
inbuild
, I got these errors[ 7%] Building CXX object bin/CMakeFiles/voxelizer.dir/voxelizerMain.cpp.o In file included from /Users/YJ-work/Desktop/cpp_programs/voxelizer/src/voxelizerMain.cpp:7: In file included from /Users/YJ-work/Desktop/cpp_programs/voxelizer/src/voxelizer.h:16: In file included from /Users/YJ-work/Desktop/cpp_programs/voxelizer/src/commons.h:17: In file included from /opt/local/include/fcl/collision.h:43: In file included from /opt/local/include/fcl/collision_object.h:45: In file included from /opt/local/include/fcl/ccd/motion_base.h:46: In file included from /opt/local/include/fcl/BV/RSS.h:41: /opt/local/include/fcl/math/constants.h:47:9: error: unknown type name 'constexpr' constexpr FCL_REAL pi = FCL_REAL(3.141592653589793238462643383279502884197169399375... ^ /opt/local/include/fcl/math/constants.h:47:27: error: expected ';' after top level declarator constexpr FCL_REAL pi = FCL_REAL(3.141592653589793238462643383279502884197169399375... ^ ; /opt/local/include/fcl/math/constants.h:50:9: error: unknown type name 'constexpr' constexpr FCL_REAL phi = FCL_REAL(1.618033988749894848204586834365638117720309179805... ^ /opt/local/include/fcl/math/constants.h:50:27: error: expected ';' after top level declarator constexpr FCL_REAL phi = FCL_REAL(1.618033988749894848204586834365638117720309179805... ^ ; In file included from /Users/YJ-work/Desktop/cpp_programs/voxelizer/src/voxelizerMain.cpp:7: In file included from /Users/YJ-work/Desktop/cpp_programs/voxelizer/src/voxelizer.h:16: In file included from /Users/YJ-work/Desktop/cpp_programs/voxelizer/src/commons.h:17: In file included from /opt/local/include/fcl/collision.h:43: In file included from /opt/local/include/fcl/collision_object.h:45: In file included from /opt/local/include/fcl/ccd/motion_base.h:46: /opt/local/include/fcl/BV/RSS.h:114:50: error: no member named 'pi' in namespace 'fcl::constants' return (l[0] l[1] 2 r + 4 constants::pi r r * r);