floatlazer / semantic_slam

Real time semantic slam in ROS with a hand held RGB-D camera
GNU General Public License v3.0
647 stars 179 forks source link

Error Building octomap_generator #57

Closed jolags313 closed 9 months ago

jolags313 commented 10 months ago

Hello, I am trying to use semantic_slam, but I am running into an issue with building. For context, I am using ROS Noetic, and all of the other packages build just fine. But, whenever I try to build the octomap_generator package, I get the following error

Errors     << octomap_generator:make /home/conlab/slam_ws/logs/octomap_generator/build.make.012.log                                                                                                       
/home/conlab/slam_ws/src/semantic_slam/octomap_generator/src/octomap_generator/octomap_generator_ros.cpp: In member function ‘bool OctomapGeneratorNode::save(const char*) const’:
/home/conlab/slam_ws/src/semantic_slam/octomap_generator/src/octomap_generator/octomap_generator_ros.cpp:112:1: warning: no return statement in function returning non-void [-Wreturn-type]
  112 | }
      | ^
/usr/bin/ld: CMakeFiles/octomap_generator.dir/src/octomap_generator/octomap_generator.cpp.o: in function `octomap::OccupancyOcTreeBase<octomap::ColorOcTreeNode>::insertPointCloud(octomap::ScanNode const&, double, bool, bool)':
octomap_generator.cpp:(.text._ZN7octomap19OccupancyOcTreeBaseINS_15ColorOcTreeNodeEE16insertPointCloudERKNS_8ScanNodeEdbb[_ZN7octomap19OccupancyOcTreeBaseINS_15ColorOcTreeNodeEE16insertPointCloudERKNS_8ScanNodeEdbb]+0x4a): undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)'
/usr/bin/ld: CMakeFiles/octomap_generator.dir/src/octomap_generator/octomap_generator.cpp.o: in function `octomap::OccupancyOcTreeBase<octomap::SemanticsOcTreeNode<octomap::SemanticsMax> >::insertPointCloud(octomap::ScanNode const&, double, bool, bool)':
octomap_generator.cpp:(.text._ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_12SemanticsMaxEEEE16insertPointCloudERKNS_8ScanNodeEdbb[_ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_12SemanticsMaxEEEE16insertPointCloudERKNS_8ScanNodeEdbb]+0x4a): undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)'
/usr/bin/ld: CMakeFiles/octomap_generator.dir/src/octomap_generator/octomap_generator.cpp.o: in function `octomap::OccupancyOcTreeBase<octomap::SemanticsOcTreeNode<octomap::SemanticsBayesian> >::insertPointCloud(octomap::ScanNode const&, double, bool, bool)':
octomap_generator.cpp:(.text._ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_17SemanticsBayesianEEEE16insertPointCloudERKNS_8ScanNodeEdbb[_ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_17SemanticsBayesianEEEE16insertPointCloudERKNS_8ScanNodeEdbb]+0x4a): undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)'
/usr/bin/ld: CMakeFiles/octomap_generator.dir/src/octomap_generator/octomap_generator.cpp.o: in function `octomap::OccupancyOcTreeBase<octomap::ColorOcTreeNode>::insertPointCloud(octomap::Pointcloud const&, octomath::Vector3 const&, octomath::Pose6D const&, double, bool, bool)':
octomap_generator.cpp:(.text._ZN7octomap19OccupancyOcTreeBaseINS_15ColorOcTreeNodeEE16insertPointCloudERKNS_10PointcloudERKN8octomath7Vector3ERKNS6_6Pose6DEdbb[_ZN7octomap19OccupancyOcTreeBaseINS_15ColorOcTreeNodeEE16insertPointCloudERKNS_10PointcloudERKN8octomath7Vector3ERKNS6_6Pose6DEdbb]+0x51): undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)'
/usr/bin/ld: CMakeFiles/octomap_generator.dir/src/octomap_generator/octomap_generator.cpp.o: in function `octomap::OccupancyOcTreeBase<octomap::SemanticsOcTreeNode<octomap::SemanticsMax> >::insertPointCloud(octomap::Pointcloud const&, octomath::Vector3 const&, octomath::Pose6D const&, double, bool, bool)':
octomap_generator.cpp:(.text._ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_12SemanticsMaxEEEE16insertPointCloudERKNS_10PointcloudERKN8octomath7Vector3ERKNS8_6Pose6DEdbb[_ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_12SemanticsMaxEEEE16insertPointCloudERKNS_10PointcloudERKN8octomath7Vector3ERKNS8_6Pose6DEdbb]+0x51): undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)'
/usr/bin/ld: CMakeFiles/octomap_generator.dir/src/octomap_generator/octomap_generator.cpp.o:octomap_generator.cpp:(.text._ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_17SemanticsBayesianEEEE16insertPointCloudERKNS_10PointcloudERKN8octomath7Vector3ERKNS8_6Pose6DEdbb[_ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_17SemanticsBayesianEEEE16insertPointCloudERKNS_10PointcloudERKN8octomath7Vector3ERKNS8_6Pose6DEdbb]+0x51): more undefined references to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)' follow
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/octomap_generator.dir/build.make:399: /home/conlab/slam_ws/devel/lib/octomap_generator/octomap_generator] Error 1
make[1]: *** [CMakeFiles/Makefile2:2167: CMakeFiles/octomap_generator.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
cd /home/conlab/slam_ws/build/octomap_generator; catkin build --get-env octomap_generator | catkin env -si  /usr/bin/make --jobserver-auth=3,4; cd -

I have tried adding return true; to the function so that it can return something, but I get the following error

Errors     << octomap_generator:make /home/conlab/slam_ws/logs/octomap_generator/build.make.013.log                                                                                                       
/usr/bin/ld: CMakeFiles/octomap_generator.dir/src/octomap_generator/octomap_generator.cpp.o: in function `octomap::OccupancyOcTreeBase<octomap::ColorOcTreeNode>::insertPointCloud(octomap::ScanNode const&, double, bool, bool)':
octomap_generator.cpp:(.text._ZN7octomap19OccupancyOcTreeBaseINS_15ColorOcTreeNodeEE16insertPointCloudERKNS_8ScanNodeEdbb[_ZN7octomap19OccupancyOcTreeBaseINS_15ColorOcTreeNodeEE16insertPointCloudERKNS_8ScanNodeEdbb]+0x4a): undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)'
/usr/bin/ld: CMakeFiles/octomap_generator.dir/src/octomap_generator/octomap_generator.cpp.o: in function `octomap::OccupancyOcTreeBase<octomap::SemanticsOcTreeNode<octomap::SemanticsMax> >::insertPointCloud(octomap::ScanNode const&, double, bool, bool)':
octomap_generator.cpp:(.text._ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_12SemanticsMaxEEEE16insertPointCloudERKNS_8ScanNodeEdbb[_ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_12SemanticsMaxEEEE16insertPointCloudERKNS_8ScanNodeEdbb]+0x4a): undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)'
/usr/bin/ld: CMakeFiles/octomap_generator.dir/src/octomap_generator/octomap_generator.cpp.o: in function `octomap::OccupancyOcTreeBase<octomap::SemanticsOcTreeNode<octomap::SemanticsBayesian> >::insertPointCloud(octomap::ScanNode const&, double, bool, bool)':
octomap_generator.cpp:(.text._ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_17SemanticsBayesianEEEE16insertPointCloudERKNS_8ScanNodeEdbb[_ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_17SemanticsBayesianEEEE16insertPointCloudERKNS_8ScanNodeEdbb]+0x4a): undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)'
/usr/bin/ld: CMakeFiles/octomap_generator.dir/src/octomap_generator/octomap_generator.cpp.o: in function `octomap::OccupancyOcTreeBase<octomap::ColorOcTreeNode>::insertPointCloud(octomap::Pointcloud const&, octomath::Vector3 const&, octomath::Pose6D const&, double, bool, bool)':
octomap_generator.cpp:(.text._ZN7octomap19OccupancyOcTreeBaseINS_15ColorOcTreeNodeEE16insertPointCloudERKNS_10PointcloudERKN8octomath7Vector3ERKNS6_6Pose6DEdbb[_ZN7octomap19OccupancyOcTreeBaseINS_15ColorOcTreeNodeEE16insertPointCloudERKNS_10PointcloudERKN8octomath7Vector3ERKNS6_6Pose6DEdbb]+0x51): undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)'
/usr/bin/ld: CMakeFiles/octomap_generator.dir/src/octomap_generator/octomap_generator.cpp.o: in function `octomap::OccupancyOcTreeBase<octomap::SemanticsOcTreeNode<octomap::SemanticsMax> >::insertPointCloud(octomap::Pointcloud const&, octomath::Vector3 const&, octomath::Pose6D const&, double, bool, bool)':
octomap_generator.cpp:(.text._ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_12SemanticsMaxEEEE16insertPointCloudERKNS_10PointcloudERKN8octomath7Vector3ERKNS8_6Pose6DEdbb[_ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_12SemanticsMaxEEEE16insertPointCloudERKNS_10PointcloudERKN8octomath7Vector3ERKNS8_6Pose6DEdbb]+0x51): undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)'
/usr/bin/ld: CMakeFiles/octomap_generator.dir/src/octomap_generator/octomap_generator.cpp.o:octomap_generator.cpp:(.text._ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_17SemanticsBayesianEEEE16insertPointCloudERKNS_10PointcloudERKN8octomath7Vector3ERKNS8_6Pose6DEdbb[_ZN7octomap19OccupancyOcTreeBaseINS_19SemanticsOcTreeNodeINS_17SemanticsBayesianEEEE16insertPointCloudERKNS_10PointcloudERKN8octomath7Vector3ERKNS8_6Pose6DEdbb]+0x51): more undefined references to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)' follow
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/octomap_generator.dir/build.make:399: /home/conlab/slam_ws/devel/lib/octomap_generator/octomap_generator] Error 1
make[1]: *** [CMakeFiles/Makefile2:2167: CMakeFiles/octomap_generator.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
cd /home/conlab/slam_ws/build/octomap_generator; catkin build --get-env octomap_generator | catkin env -si  /usr/bin/make --jobserver-auth=3,4; cd -

Does anyone know how to fix this?