Skip to content

fix(grid_map_cv): use the cv::COLOR_* constants - #558

Merged
wep21 merged 1 commit into
ANYbotics:rollingfrom
wep21:fix/opencv5-color-constants
Nov 14, 2026
Merged

wep21 merged 1 commit into
ANYbotics:rollingfrom
wep21:fix/opencv5-color-constants

Conversation

@wep21

@wep21 wep21 commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

What

Use cv::COLOR_BGR2GRAY, cv::COLOR_BGRA2GRAY and cv::COLOR_BGRA2RGB in GridMapCvConverter.hpp. Split from #556.

Why

OpenCV 5 removed the C constants CV_BGR2GRAY, CV_BGRA2GRAY and CV_BGRA2RGB, so grid_map_cv and every package that includes GridMapCvConverter.hpp do not build with it:

grid_map_cv/include/grid_map_cv/GridMapCvConverter.hpp:90:38: error: use of undeclared identifier 'CV_BGR2GRAY'

conda-forge ships OpenCV 5, and RoboStack carries this change as a patch. The cv::COLOR_* constants also exist in OpenCV 3 and 4.

How it was tested

🤖 Generated with Claude Code

OpenCV 5 removed the C constants CV_BGR2GRAY, CV_BGRA2GRAY and CV_BGRA2RGB,
so GridMapCvConverter.hpp does not compile with it. conda-forge ships
OpenCV 5, and RoboStack carries this change as a patch for Lyrical.
The cv::COLOR_* constants also exist in OpenCV 3 and 4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wep21
wep21 merged commit 53f457f into ANYbotics:rolling Nov 14, 2026
5 checks passed
@wep21
wep21 deleted the fix/opencv5-color-constants branch November 14, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant