Autoware.Auto
autoware::localization::ndt::NDTMapPublisher Class Reference

#include <ndt_map_publisher.hpp>

Public Types

using MapConfig = perception::filters::voxel_grid::Config
 

Public Member Functions

 NDTMapPublisher (const MapConfig &map_config, sensor_msgs::msg::PointCloud2 &map_pc, sensor_msgs::msg::PointCloud2 &source_pc)
 
geocentric_pose_t load_map (const std::string &yaml_file_name, const std::string &pcl_file_name)
 
void map_to_pc (const ndt::DynamicNDTMap &ndt_map)
 
void reset_pc_msg (sensor_msgs::msg::PointCloud2 &msg)
 

Member Typedef Documentation

◆ MapConfig

Constructor & Destructor Documentation

◆ NDTMapPublisher()

autoware::localization::ndt::NDTMapPublisher::NDTMapPublisher ( const MapConfig map_config,
sensor_msgs::msg::PointCloud2 &  map_pc,
sensor_msgs::msg::PointCloud2 &  source_pc 
)

Member Function Documentation

◆ load_map()

geocentric_pose_t autoware::localization::ndt::NDTMapPublisher::load_map ( const std::string &  yaml_file_name,
const std::string &  pcl_file_name 
)

Read the pcd file with filename into a PointCloud2 message, transform it into an NDT representation and then serialize the ndt representation back into a PointCloud2 message that can be published.

Parameters
yaml_file_nameFile name of the yaml file.
pcl_file_nameFile name of the pcd file.
Returns
The geocentric position.

◆ map_to_pc()

void autoware::localization::ndt::NDTMapPublisher::map_to_pc ( const ndt::DynamicNDTMap ndt_map)

Iterate over the map representation and convert it into a PointCloud2 message where each voxel in the map corresponds to a single point in the PointCloud2 field. See the documentation for the specs and the format of the point cloud message.

◆ reset_pc_msg()

void autoware::localization::ndt::NDTMapPublisher::reset_pc_msg ( sensor_msgs::msg::PointCloud2 &  msg)

Convenience function to clear the contents of a pointcloud message. Can be removed when #102 is merged in.


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