diff --git a/fuse_viz/src/relative_pose_2d_stamped_constraint_visual.cpp b/fuse_viz/src/relative_pose_2d_stamped_constraint_visual.cpp index b85cfad1c..120440fc9 100644 --- a/fuse_viz/src/relative_pose_2d_stamped_constraint_visual.cpp +++ b/fuse_viz/src/relative_pose_2d_stamped_constraint_visual.cpp @@ -343,7 +343,13 @@ Ogre::ColourValue RelativePose2DStampedConstraintVisual::computeLossErrorLineCol // Get the error line color as HSB: Ogre::ColourValue error_line_color(color.r, color.g, color.b); Ogre::Real hue, saturation, brightness; +#if (OGRE_VERSION < ((1 << 16) | (11 << 8) | 0)) + // 1.10 or earlier + error_line_color.getHSB(&hue, &saturation, &brightness); +# else + // 1.11 or later error_line_color.getHSB(hue, saturation, brightness); +#endif // We should correct the color brightness if it is smaller than minimum brightness. Otherwise, we would get an // incorrect loss brightness.