Autoware.Auto
autoware::mapping::point_cloud_mapping::VoxelMap Class Reference

#include <map.hpp>

Inheritance diagram for autoware::mapping::point_cloud_mapping::VoxelMap:
Collaboration diagram for autoware::mapping::point_cloud_mapping::VoxelMap:

Public Types

using Base = MapRepresentationBase< sensor_msgs::msg::PointCloud2, MapStorageMode::Independent >
 
using PCLCloud = pcl::PointCloud< pcl::PointXYZI >
 
using Cloud = sensor_msgs::msg::PointCloud2
 
using CloudIt = sensor_msgs::PointCloud2Iterator< float32_t >
 
using CloudConstIt = sensor_msgs::PointCloud2ConstIterator< float32_t >
 
- Public Types inherited from autoware::mapping::point_cloud_mapping::MapRepresentationBase< sensor_msgs::msg::PointCloud2, MapStorageMode::Independent >
using Increment = sensor_msgs::msg::PointCloud2
 

Public Member Functions

 VoxelMap (const perception::filters::voxel_grid::Config &grid_config, const std::string &frame="map")
 
MapUpdateSummary try_add_observation (const Cloud &observation, const geometry_msgs::msg::PoseWithCovarianceStamped &) override
 
void write (const std::string &file_name_prefix) const override
 
std::size_t size () const noexcept override
 Size of the voxel grid. More...
 
std::size_t capacity () const noexcept override
 Capacity of the voxel grid. More...
 
void clear () override
 Clear the voxel grid. More...
 
- Public Member Functions inherited from autoware::mapping::point_cloud_mapping::MapRepresentationBase< sensor_msgs::msg::PointCloud2, MapStorageMode::Independent >
virtual std::size_t size () const noexcept=0
 
virtual std::size_t capacity () const noexcept=0
 
virtual ~MapRepresentationBase ()=default
 

Static Public Attributes

static constexpr auto NUM_FIELDS {4U}
 

Additional Inherited Members

- Static Public Member Functions inherited from autoware::mapping::point_cloud_mapping::MapRepresentationBase< sensor_msgs::msg::PointCloud2, MapStorageMode::Independent >
static constexpr MapStorageMode storage_mode () noexcept
 

Detailed Description

A map that accumulates lidar scans in a downsampled format using a voxel grid. A voxel grid is used

Member Typedef Documentation

◆ Base

◆ Cloud

using autoware::mapping::point_cloud_mapping::VoxelMap::Cloud = sensor_msgs::msg::PointCloud2

◆ CloudConstIt

using autoware::mapping::point_cloud_mapping::VoxelMap::CloudConstIt = sensor_msgs::PointCloud2ConstIterator<float32_t>

◆ CloudIt

using autoware::mapping::point_cloud_mapping::VoxelMap::CloudIt = sensor_msgs::PointCloud2Iterator<float32_t>

◆ PCLCloud

using autoware::mapping::point_cloud_mapping::VoxelMap::PCLCloud = pcl::PointCloud<pcl::PointXYZI>

Constructor & Destructor Documentation

◆ VoxelMap()

autoware::mapping::point_cloud_mapping::VoxelMap::VoxelMap ( const perception::filters::voxel_grid::Config grid_config,
const std::string &  frame = "map" 
)
explicit

Constructor

Parameters
grid_configGrid configuration of the underlying voxel grid.
frameFrame id of the map.

Member Function Documentation

◆ capacity()

std::size_t autoware::mapping::point_cloud_mapping::VoxelMap::capacity ( ) const
overridenoexcept

Capacity of the voxel grid.

◆ clear()

void autoware::mapping::point_cloud_mapping::VoxelMap::clear ( )
overridevirtual

◆ size()

std::size_t autoware::mapping::point_cloud_mapping::VoxelMap::size ( ) const
overridenoexcept

Size of the voxel grid.

◆ try_add_observation()

MapUpdateSummary autoware::mapping::point_cloud_mapping::VoxelMap::try_add_observation ( const Cloud observation,
const geometry_msgs::msg::PoseWithCovarianceStamped &   
)
overridevirtual

Try to extend the map with the given point cloud.

Parameters
observationPoint cloud in the "map" frame to add to the map.
Returns
A struct summarizing the outcome of the insertion attempt.

Implements autoware::mapping::point_cloud_mapping::MapRepresentationBase< sensor_msgs::msg::PointCloud2, MapStorageMode::Independent >.

◆ write()

void autoware::mapping::point_cloud_mapping::VoxelMap::write ( const std::string &  file_name_prefix) const
overridevirtual

Convert the voxel grid to a point cloud and write it to a pcd file.

Parameters
file_name_prefixFile name prefix of the file.

Implements autoware::mapping::point_cloud_mapping::MapRepresentationBase< sensor_msgs::msg::PointCloud2, MapStorageMode::Independent >.

Member Data Documentation

◆ NUM_FIELDS

constexpr auto autoware::mapping::point_cloud_mapping::VoxelMap::NUM_FIELDS {4U}
staticconstexpr

The documentation for this class was generated from the following files: