zcdoyle / fbet

3D-FBET
21 stars 4 forks source link

/devel/lib/libfbet.so: undefined reference to `octomap::OcTreeLUT::OcTreeLUT(unsigned int)' #1

Open jkwang1992 opened 7 years ago

jkwang1992 commented 7 years ago

When I tried to implement catkin_make in the catkin work space, I met these problems: /home/jk/temp/devel/lib/libfbet.so: undefined reference to octomap::OcTreeLUT::OcTreeLUT(unsigned int)' /home/jk/temp/devel/lib/libfbet.so: undefined reference tooctomap::OcTreeLUT::~OcTreeLUT()' /home/jk/temp/devel/lib/libfbet.so: undefined reference to `octomap::OcTreeLUT::genNeighborKey(octomap::OcTreeKey const&, signed char const&, octomap::OcTreeKey&) const' collect2: error: ld returned 1 exit status fbet/CMakeFiles/fbet_node.dir/build.make:753: recipe for target '/home/jk/temp/devel/lib/fbet/fbet_node' failed make[2]: [/home/jk/temp/devel/lib/fbet/fbet_node] Error 1 CMakeFiles/Makefile2:3403: recipe for target 'fbet/CMakeFiles/fbet_node.dir/all' failed make[1]: [fbet/CMakeFiles/fbet_node.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed

abdur4373 commented 5 years ago

Hello @WangJIankun1992
Did you find solution to that? OcTreeLUT is not maintained in recent version of octomap. Any alternate or changes recommended?

jkwang1992 commented 5 years ago

@abdur4373 Sorry, I forgot how to solve it as it happened two years ago.

saifullah3396 commented 5 years ago

Just rebuild octomap with OcTreeLUT or use an older version. Works fine.

davidchangoluisa commented 1 year ago

I think solved the issue, it worked by including an older version of the octomap as mentioned by @saifullah3396. So the steps are: 1.) Remove all the octomap packages you have in your src. 2) Clone the following packages in your src folder git clone https://github.com/AnaBatinovic/octomap-1.7.2.git git clone https://github.com/OctoMap/octomap_ros.git 3) add the following lines to the .bashrc file export octomap_DIR=~/your_workspace/src/octomap-1.7.2/octomap/lib/cmake/octomap 4) when creating the lut table (in the FBETServer.h)you have to initialize as follows:

octomap::OcTreeLUT lut{16};

I found this solution by looking at this implementation: https://github.com/larics/uav_frontier_exploration_3d