clearpathrobotics / occupancy_grid_utils

Forked from https://kforge.ros.org/gridutils/git with Catkinizing changes. The package contains utilities for dealing with occupancy grids, represented as nav_msgs::OccupancyGrid objects, including coordinate conversions, shortest paths, ray tracing, and constructing from laser scans.
42 stars 48 forks source link

Error with OpenCV while building #24

Open eladden opened 4 years ago

eladden commented 4 years ago

Got the following error while building

Errors << occupancy_grid_utils:make ~/catkin_ws/logs/occupancy_grid_utils/build.make.000.log
~/catkin_ws/src/occupancy_grid_utils/src/file.cpp: In function ‘void occupancy_grid_utils::loadMapFromFile(nav_msgs::GetMap::Response, const char, double, bool, double, double, double*)’: ~/catkin_ws/src/occupancy_grid_utils/src/file.cpp:91:27: error: ‘CV_BGR2GRAY’ was not declared in this scope cvtColor(imgColor, img, CV_BGR2GRAY); ^~~

This is because OpenCV 3 and higher depreciated that constant.

The fix would be to change to cv::COLOR_BGR2GRAY

martinmagnusson commented 2 years ago

This works now in the noetic-devel branch. See #25.