Skip to content

Reusable colormap facility (camp::map::ColorMap) for scalar-field layers #63

Description

@rolker

Summary

Introduce a small, reusable colormap facility in the shared map library
(camp::map::ColorMap) so scalar fields render through a selectable set of
named colormaps instead of per-subsystem hardcoded ramps.

Motivation

The camp2 map-system port (#59) drops camp's hardcoded grid_map "speed"
colormap (a situational green/red ramp) in favor of camp2's generic grayscale
auto-range default. Rather than reintroduce another one-off ramp, we want a
generic colormap component usable across camp's scalar-field renderers.

Today the same value→color pattern is reimplemented per subsystem:

Both are natural consumers of one shared facility.

Scope

  • camp::map::ColorMap in libcamp_map: a named lookup (grayscale,
    plus a few perceptually reasonable ramps, e.g. viridis, turbo) mapping a
    value + range → QColor, with optional fixed or auto range.
  • Per-layer colormap selection in the layer tree (which colormap + range a
    grid_map / scalar layer uses).
  • Wire grid_map layers to it; migrate depth-raster shading onto it.
  • Leave OccupancyGrid on its standard 0–100 occupancy spec colormap
    (already parity, docs/parity/grids.md) unless a reason emerges to unify.

Notes


Authored-By: Claude Code Agent
Model: Claude Opus 4.8 (1M context)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions