Compilation failed ElevationMapGroundPlaneRemover
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()); | ^~~~~~~~~~~~~
Most likely cause is that you're still pulling in the system install of the grid_map_pcl
- In this case, clean your entire workspace (
catkin clean). - Rebuild the grid_map_pcl,
catkin build grid_map_pcl - source your workspace
- build the tree detection
I faced the same problem as @jelavice with the steps below:
- catkin_make (for grid_map)
- 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
Already solved. It is due to opencv version.