16#ifndef APOLLO_LIDAR_COMPONENT_BASE_H
17#define APOLLO_LIDAR_COMPONENT_BASE_H
26template <
typename ScanType>
36 const std::shared_ptr<ScanType>& scan_message) = 0;
44 bool WriteScan(
const std::shared_ptr<ScanType>& scan_message) {
45 return BaseComponent::WriteScan(scan_message);
49 return BaseComponent::AllocatePointCloud();
53 return BaseComponent::WritePointCloud(point_cloud);
bool InitConverter(const LidarConfigBase &lidar_config_base)
bool InitPacket(const LidarConfigBase &lidar_config_base)
bool WriteScan(const std::shared_ptr< ScanType > &scan_message)
LidarComponentBaseImpl< ScanType > BaseComponent
virtual ~LidarComponentBase()=default
std::shared_ptr< PointCloud > AllocatePointCloud()
bool WritePointCloud(const std::shared_ptr< PointCloud > &point_cloud)
virtual void ReadScanCallback(const std::shared_ptr< ScanType > &scan_message)=0
bool InitBase(const LidarConfigBase &lidar_config_base) override
#define RETURN_VAL_IF(condition, val)