NavMap
Loading...
Searching...
No Matches
Combine.hpp File Reference

Combining one layer into another with explicit operators, unknown-aware, with provenance. More...

#include <cstddef>
#include <cstdint>
#include <limits>
#include <string>
#include <vector>
#include "navmap_core/NavMap.hpp"
Include dependency graph for Combine.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CombineOptions
 Options of combine_layer(). More...

Namespaces

namespace  navmap

Enumerations

enum class  CombineOp : uint8_t {
  OVERWRITE , TRUE_OVERWRITE , MAX , MAX_KEEP_UNKNOWN ,
  MIN , ADD
}
 How a source value s is combined into the destination value d (as costmap_2d's update modes). More...

Functions

std::ptrdiff_t combine_layer (NavMap &nm, const std::string &dst, const std::string &src, CombineOp op, const CombineOptions &options={})
 Combine layer src into layer dst cell by cell with op.

Detailed Description

Combining one layer into another with explicit operators, unknown-aware, with provenance.

Each source (a static prior, obstacles from a sensor, a keep-out zone) keeps its own layer, and a master layer is composed from them. Clearing a source layer then never erases another source: a prior survives sensor clearing because it is never written by the sensor.

The cost convention (Costs.hpp) is that of costmap_2d / Nav2.