|
Autoware.Auto
|
|
This package contains ndt related ROS2 nodes.
NDTMapPublisherNode is responsible for providing point cloud map data to recipients and publishing the "earth->map" transform. It does this by reading from a .yaml file, which contains the filename of a .pcd point cloud map as well as the map origin in geocentric coordinates (latitude, longitude and elevation). The transform is constructed using GeographicLib library and published as a static transform. The node reads the point cloud file from disk, and transforms the point cloud into an ndt map (voxel and covariances) and then publishes this map. The node also converts the map data into a point cloud suitable for visualization in rviz2, and publishes this point cloud.
Since the file IO means that this node cannot be used in a real time context, the dependency constraints are more relaxed and pcl is used for reading and writing of .pcd files.
The workflow of the publisher can be summarized as the following:
.yaml file containing a .pcd file name and the origin of the point cloud map in geocentric coordinates (lat, lon, evelation).earth and map..pcd file into a sensor_msgs::msg::PointCloud2 message.PointCloud2 message where each point represents a single cell in the ndt map.PointCloud2 message containing the ndt map.sensor_msgs::msg::PointCloud2 with a Point type suitable to be received by rviz2.PointCloud2 message containing the full point cloudThe published ndt map point cloud message has the following fields:
cell_id has a count of 2U meaning it is practically an unsigned int[2]. This was necessary to represent 64 bit voxel indices since sensor_msgs::msg::PointField struct does not support 64 bit integer types.
The published point cloud message of the full point cloud has the following fields:
The launch file for this node also launches a voxel_grid_node to subsample the published full point cloud to reduce the number of points to be visualized.