Map operations
The settings in the config’s map_operations
section are used to add operations that will be applied to wavemap’s map. The expected format is a YAML list, where each item represents a separate map operation. These operations function like plugins, receiving a callback each time the map is updated by a new measurement. For efficiency, most plugins can be throttled to run at most once every n seconds.
C++ Library
This subsection describes the operations available in wavemap’s C++ library.
Threshold map
Selected by setting map_operations[i]/type
to "threshold_map"
.
This operation thresholds the map’s occupancy values to stay within the range specified by min_log_odds and max_log_odds, which are configured under map
.
-
struct ThresholdMapOperationConfig : public wavemap::ConfigBase<ThresholdMapOperationConfig, 1>
Config struct for map thresholding operations.
Public Members
-
Seconds<FloatingPoint> once_every = 2.f
Time period controlling how often the map is thresholded.
-
Seconds<FloatingPoint> once_every = 2.f
Prune map
Selected by setting map_operations[i]/type
to "prune_map"
.
This operation frees up memory by pruning octree nodes that are no longer needed – specifically, nodes whose wavelet coefficients are all zero and which have no children. Note that this pruning operation is lossless and does not alter the estimated occupancy posterior.
-
struct PruneMapOperationConfig : public wavemap::ConfigBase<PruneMapOperationConfig, 1>
Config struct for map pruning operations.
Public Members
-
Seconds<FloatingPoint> once_every = 10.f
Time period controlling how often the map is pruned.
-
Seconds<FloatingPoint> once_every = 10.f
ROS1 Interface
In addition to the map operations provided by the C++ library, wavemap’s ROS1 interface offers several ROS-specific operations.
Publish map
Selected by setting map_operations[i]/type
to "publish_map"
.
This operation publishes the current map to a ROS topic, allowing other ROS nodes to access and utilize the map’s data.
-
struct PublishMapOperationConfig : public ConfigBase<PublishMapOperationConfig, 3>
Config struct for map publishing operations.
Public Members
-
Seconds<FloatingPoint> once_every = 2.f
Time period controlling how often the map is published.
-
Seconds<FloatingPoint> once_every = 2.f
Publish pointcloud
Selected by setting map_operations[i]/type
to "publish_pointcloud"
.
This operation publishes a pointcloud representation of the map to a ROS topic, enabling processing by ROS nodes without requiring wavemap’s C++ library.
-
struct PublishPointcloudOperationConfig : public ConfigBase<PublishPointcloudOperationConfig, 4>
Config struct for obstacle pointcloud publishing operations.
Public Members
-
Seconds<FloatingPoint> once_every = 1.f
Time period controlling how often the pointcloud is published.
-
FloatingPoint occupancy_threshold_log_odds = 1e-3f
Threshold in log odds above which cells are classified as occupied.
-
Seconds<FloatingPoint> once_every = 1.f
Crop map
Selected by setting map_operations[i]/type
to "crop_map"
.
This operation crops the map to a specified radius around the robot, to enable local mapping.
-
struct CropMapOperationConfig : public ConfigBase<CropMapOperationConfig, 3>
Config struct for map cropping operations.
Public Members
-
Seconds<FloatingPoint> once_every = 10.f
Time period controlling how often the map is cropped.
-
std::string body_frame = "body"
Name of the TF frame to treat as the center point.
Usually the robot’s body frame. When the cropper runs, all blocks that are further than remove_blocks_beyond_distance from this point are deleted.
-
Meters<FloatingPoint> remove_blocks_beyond_distance
Distance beyond which blocks are deleted when the cropper is executed.
-
Seconds<FloatingPoint> once_every = 10.f