Function mrpt::ros2bridge::pointCloud2ToObservation
Defined in File ros_to_mrpt_obs.h
Function Documentation
-
mrpt::obs::CObservationPointCloud::Ptr mrpt::ros2bridge::pointCloud2ToObservation(const sensor_msgs::msg::PointCloud2 &pts, const std::string &sensorLabel)
Convert a PointCloud2 message to CObservationPointCloud.
Picks the richest available point-map type (CGenericPointsMap > CPointsMapXYZIRT > CPointsMapXYZI > CSimplePointsMap)
Applies fixLivoxTimestampsIfNeeded() automatically.
The caller is responsible for filling sensorPose afterwards.
- Returns:
nullptr if the point cloud lacks x/y/z fields.