tree_detection icon indicating copy to clipboard operation
tree_detection copied to clipboard

Compilation failed ElevationMapGroundPlaneRemover

Open jelavice opened this issue 3 years ago • 3 comments

Despite installing the grid map from the source, compilation can still fail. E.g. with an error below: /home/nubertj/workspaces/rsl_workspaces/gravis/panoptic_ws/src/tree_detection/ground_plane_removal/src/ElevationMapGroundPlaneRemover.cpp: In member function ‘virtual void ground_removal::ElevationMapGroundPlaneRemover::setParameters(const ground_removal::GroundPlaneRemoverParam&)’: /home/nubertj/workspaces/rsl_workspaces/gravis/panoptic_ws/src/tree_detection/ground_plane_removal/src/ElevationMapGroundPlaneRemover.cpp:107:16: error: ‘class grid_map::GridMapPclLoader’ has no member named ‘setParameters’; did you mean ‘getParameters’? 107 | pclToGridMap_.setParameters(param_.pclConverter_.get()); | ^~~~~~~~~~~~~

jelavice avatar Dec 05 '22 10:12 jelavice

Most likely cause is that you're still pulling in the system install of the grid_map_pcl

  1. In this case, clean your entire workspace ( catkin clean).
  2. Rebuild the grid_map_pcl, catkin build grid_map_pcl
  3. source your workspace
  4. build the tree detection

jelavice avatar Dec 05 '22 10:12 jelavice

I faced the same problem as @jelavice with the steps below:

  1. catkin_make (for grid_map)
  2. catkin_make (for tree_detection_ros)

If I changed to catkin build grid_map_pcl, it throws error :

/home/ubuntu18/catkin_treedet/devel/.private/grid_map_ros/lib/libgrid_map_ros.so: undefined reference to `cv::Mat::Mat()' collect2: error: ld returned 1 exit status make[2]: *** [/home/ubuntu18/catkin_treedet/devel/.private/grid_map_pcl/lib/grid_map_pcl/grid_map_pcl_loader_node] Error 1 make[1]: *** [CMakeFiles/grid_map_pcl_loader_node.dir/all] Error 2 make: *** [all] Error 2

Btw, I am using Melodic.

Thanks

darissa avatar Mar 09 '23 07:03 darissa

Already solved. It is due to opencv version.

darissa avatar Mar 14 '23 02:03 darissa