Apollo 10.0
自动驾驶开放平台
apollo::perception::lidar 命名空间参考

命名空间

namespace  centerpoint
 
namespace  cnnseg
 
namespace  maskpillars
 
namespace  pointpillars
 
namespace  type_util
 
namespace  util
 

class  AnchorMaskCuda
 
class  BackgroundFilter
 
struct  BackgroundFilterConfig
 
class  BaseBipartiteGraphMatcher
 
class  BaseClassifier
 
class  BaseDownSample
 
class  BaseGroundDetector
 
class  BaseLidarDetector
 
class  BaseMultiShotTypeFusion
 
class  BaseMultiTargetTracker
 
class  BaseObjectFilter
 
class  BaseOneShotTypeFusion
 
class  BasePointCloudPreprocessor
 
class  BaseROIFilter
 
class  BaseSequenceTypeFusion
 
class  BaseSingleShotTypeFusion
 
struct  BipartiteGraphMatcherInitOptions
 
struct  BipartiteGraphMatcherOptions
 
class  Bitmap2D
 
class  CCRFMultiShotTypeFusion
 
class  CCRFOneShotTypeFusion
 
class  CCRFSequenceTypeFusion
 
class  CCRFSingleShotTypeFusion
 
struct  CcrfTypeFusionConfig
 
struct  CCRFTypeFusionConfig
 
class  CenterPointDetection
 
struct  ClassifierInitOptions
 
struct  ClassifierOptions
 
class  CloudMask
 
class  CNNSegmentation
 
class  ConfigUtil
 
struct  DownSampleInitOptions
 
struct  DownSampleOptions
 
class  FeatureDescriptor
 
class  FeatureGenerator
 
struct  FilterBankConfig
 
class  FusedClassifier
 
struct  FusedClassifierConfig
 
class  GnnBipartiteGraphMatcher
 
struct  GroundDetectorInitOptions
 
struct  GroundDetectorOptions
 
class  GroundGrid
 
struct  GroundNode
 
class  GroundService
 
struct  GroundServiceConfig
 
class  GroundServiceContent
 
class  GroundServiceDetector
 
struct  GroundServiceDetectorConfig
 
class  HdmapROIFilter
 
struct  HDMapRoiFilterConfig
 
class  LidarDetectionComponent
 
struct  LidarDetectionComponentConfig
 
class  LidarDetectionFilterComponent
 
struct  LidarDetectionFilterComponentConfig
 
struct  LidarDetectorInitOptions
 
struct  LidarDetectorOptions
 
struct  LidarFrame
 
struct  LidarFrameInitializer
 
class  LidarOutputComponent
 
struct  LidarOutputComponentConfig
 
struct  LidarProcessResult
 
class  LidarTrackingComponent
 
struct  LidarTrackingComponentConfig
 
class  Logger
 
class  MapManager
 
struct  MapManagerConfig
 
struct  MapManagerInitOptions
 
struct  MapManagerOptions
 
class  MaskPillarsDetection
 
class  MatchCost
 
class  MlfBaseFilter
 
struct  MlfDistanceConfig
 
struct  MlfDistanceWeight
 
class  MlfEngine
 
struct  MlfEngineConfig
 
struct  MlfFilterInitOptions
 
struct  MlfFilterOptions
 
class  MlfMotionFilter
 
struct  MlfMotionFilterConfig
 
class  MlfMotionMeasurement
 
class  MlfMotionRefiner
 
struct  MlfMotionRefinerConfig
 
struct  MlfMotionRefinerInitOptions
 
struct  MlfMotionRefinerOptions
 
struct  MlfPredict
 
class  MlfShapeFilter
 
struct  MlfShapeFilterConfig
 
class  MlfTrackData
 
struct  MlfTrackDataInitializer
 
class  MlfTracker
 
struct  MlfTrackerConfig
 
struct  MlfTrackerInitOptions
 
class  MlfTrackObjectDistance
 
struct  MlfTrackObjectDistanceInitOptions
 
class  MlfTrackObjectMatcher
 
struct  MlfTrackObjectMatcherConfig
 
struct  MlfTrackObjectMatcherInitOptions
 
struct  MlfTrackObjectMatcherOptions
 
struct  MlfTrackOptions
 
class  MlfTypeFilter
 
struct  MlfTypeFilterConfig
 
class  MultiHmBipartiteGraphMatcher
 
struct  MultiTargetTrackerInitOptions
 
struct  MultiTargetTrackerOptions
 
class  NmsCuda
 
class  ObjectBuilder
 
struct  ObjectBuilderInitOptions
 
struct  ObjectBuilderOptions
 
class  ObjectFilterBank
 
struct  ObjectFilterInitOptions
 
struct  ObjectFilterOptions
 
class  ObjectSequence
 
class  OfflineLidarDetection
 
class  OfflinePointcloudGroundDetection
 
class  Params
 
class  PclDownSample
 
struct  PclDownSampleConfig
 
struct  PCLPointXYZIT
 
struct  PCLPointXYZL
 
class  PfeCuda
 
class  PointCloudGroundDetectComponent
 
struct  PointCloudGroundDetectComponentConfig
 
class  PointCloudMapROIComponent
 
struct  PointCloudMapROIComponentConfig
 
class  PointCloudPreprocessComponent
 
struct  PointCloudPreprocessComponentConfig
 
class  PointCloudPreprocessor
 
struct  PointCloudPreprocessorConfig
 
struct  PointCloudPreprocessorInitOptions
 
struct  PointCloudPreprocessorOptions
 
class  PointPillars
 
class  PointPillarsDetection
 
class  PolygonScanCvter
 
class  PostprocessCuda
 
class  PreprocessPoints
 
class  PreprocessPointsCuda
 
class  ROIBoundaryFilter
 
struct  ROIBoundaryFilterConfig
 
struct  ROIFilterInitOptions
 
struct  ROIFilterOptions
 
class  ROIService
 
struct  ROIServiceConfig
 
class  ROIServiceContent
 
class  ROIServiceFilter
 
class  ScatterCuda
 
class  SceneManager
 
struct  SceneManagerConfig
 
struct  SceneManagerInitOptions
 
class  SceneService
 
class  SceneServiceContent
 
struct  SceneServiceInitOptions
 
class  SpatioTemporalGroundDetector
 
struct  SpatioTemporalGroundDetectorConfig
 
class  SppCCDetector
 
struct  SppCluster
 
struct  SppClusterInitializer
 
class  SppClusterList
 
struct  SppData
 
class  SppEngine
 
class  SppLabelImage
 
struct  SppParams
 
struct  SppPoint
 
class  StrategyFilter
 
struct  StrategyFilterConfig
 
class  Timer
 
class  TrackData
 
struct  TrackDataInitializer
 
struct  TrackedObject
 
struct  TrackedObjectInitializer
 
struct  TypeFilterInitOption
 
struct  TypeFilterOption
 
struct  TypeFusionInitOption
 
struct  TypeFusionOption
 

类型定义

typedef base::ConcurrentObjectPool< LidarFrame, kLidarFramePoolSize, LidarFrameInitializerLidarFramePool
 
using ObjectPtr = std::shared_ptr< apollo::perception::base::Object >
 
using PointFCloud = apollo::perception::base::PointCloud< PointF >
 
using PolygonDType = apollo::perception::base::PointCloud< PointD >
 
typedef pcl::PointXYZRGB CPoint
 
typedef pcl::PointCloud< CPointCPointCloud
 
typedef pcl::PointCloud< CPoint >::Ptr CPointCloudPtr
 
typedef pcl::PointCloud< CPoint >::ConstPtr CPointCloudConstPtr
 
typedef std::shared_ptr< GroundServiceContentGroundServiceContentPtr
 
typedef std::shared_ptr< const GroundServiceContentGroundServiceContentConstPtr
 
typedef std::shared_ptr< GroundServiceGroundServicePtr
 
typedef std::shared_ptr< const GroundServiceGroundServiceConstPtr
 
typedef std::shared_ptr< ROIServiceContentROIServiceContentPtr
 
typedef std::shared_ptr< const ROIServiceContentROIServiceContentConstPtr
 
typedef std::shared_ptr< ROIServiceROIServicePtr
 
typedef std::shared_ptr< const ROIServiceROIServiceConstPtr
 
typedef std::shared_ptr< SceneServiceContentSceneServiceContentPtr
 
typedef std::shared_ptr< const SceneServiceContentSceneServiceContentConstPtr
 
typedef std::shared_ptr< SceneServiceSceneServicePtr
 
typedef std::shared_ptr< const SceneServiceSceneServiceConstPtr
 
typedef std::shared_ptr< SppClusterSppClusterPtr
 
typedef std::shared_ptr< const SppClusterSppClusterConstPtr
 
typedef std::shared_ptr< SppLabelImageSppLabelImagePtr
 
typedef std::shared_ptr< const SppLabelImageSppLabelImageConstPtr
 
typedef base::LightObjectPool< SppCluster, kSppClusterPoolSize, SppClusterInitializer, base::SensorType::VELODYNE_64SppClusterPool
 
typedef Eigen::Matrix< double, VALID_OBJECT_TYPE, 1 > Vectord
 
typedef Eigen::Matrix< int, VALID_OBJECT_TYPE, 1 > Vectori
 
typedef Eigen::Matrix< double, VALID_OBJECT_TYPE, VALID_OBJECT_TYPEMatrixd
 
typedef std::shared_ptr< MlfTrackDataMlfTrackDataPtr
 
typedef std::shared_ptr< const MlfTrackDataMlfTrackDataConstPtr
 
typedef std::shared_ptr< TrackDataTrackDataPtr
 
typedef std::shared_ptr< const TrackDataTrackDataConstPtr
 
typedef base::ConcurrentObjectPool< TrackedObject, kTrackedObjectPoolSize, TrackedObjectInitializerTrackedObjectPool
 
typedef base::ConcurrentObjectPool< TrackData, kTrackDataPoolSize, TrackDataInitializerTrackDataPool
 
typedef base::ConcurrentObjectPool< MlfTrackData, kTrackDataPoolSize, MlfTrackDataInitializerMlfTrackDataPool
 
typedef std::shared_ptr< TrackedObjectTrackedObjectPtr
 
typedef std::shared_ptr< const TrackedObjectTrackedObjectConstPtr
 
using DirectionMajor = Bitmap2D::DirectionMajor
 
template<typename T >
using Polygon = typename PolygonScanCvter< T >::Polygon
 

枚举

enum class  LidarErrorCode {
  Succeed = 0 , InitError = 1 , PointCloudPreprocessorError = 2 , MapManagerError = 3 ,
  DetectionError = 4 , ObjectBuilderError = 5 , ObjectFilterError = 6 , ClassifierError = 7 ,
  TrackerError = 8
}
 
enum class  LidarPointLabel {
  UNKNOWN = 0 , ROI = 1 , GROUND = 2 , OBJECT = 3 ,
  MAX_LABEL
}
 
enum class  PointSemanticLabel {
  UNKNOWN = 0 , IGNORE = 1 , GROUND = 2 , OBJECT = 3 ,
  CURB = 4 , VEGETATION = 5 , FENCE = 6 , NOISE = 7 ,
  WALL = 8 , MAX_LABEL
}
 
enum class  PointMotionLabel { UNKNOWN = 0 , MOVING = 1 , STATIONARY = 2 , MAX_LABEL }
 
enum class  SppClassType {
  OTHERS = 0 , SMALLMOT = 1 , BIGMOT = 2 , CYCLIST = 3 ,
  PEDESTRIAN = 4 , CONE = 5 , MAX_TYPE = 6
}
 
enum class  MetaType {
  META_UNKNOWN = 0 , META_SMALLMOT = 1 , META_BIGMOT = 2 , META_NONMOT = 3 ,
  META_PEDESTRIAN = 4 , MAX_META_TYPE
}
 
enum  { VALID_OBJECT_TYPE = static_cast<int>(base::ObjectType::MAX_OBJECT_TYPE) - 2 }
 
enum class  MotionState { STATIC = 0 , SKEPTICAL_MOVE = 1 , TRUSTED_MOVE = 2 }
 
enum  { VALID_OBJECT_TYPE = static_cast<int>(base::ObjectType::MAX_OBJECT_TYPE) - 2 }
 

函数

 __attribute__ ((constructor)) void LidarFramePoolInitialize()
 
void GetBoundingBox2d (const std::shared_ptr< Object > &object, PointCloud< PointD > *box, double expand)
 
void ComputeObjectShapeFromPolygon (std::shared_ptr< Object > object, bool use_world_cloud)
 
void ComputePolygonDirection (const Eigen::Vector3d &ref_center, const base::ObjectPtr &object, Eigen::Vector3f *direction)
 Compute polygon direction
 
void ComputeMinMaxDirectionPoint (const base::ObjectPtr &object, const Eigen::Vector3d &ref_center, size_t *max_point_index, size_t *min_point_index)
 Compute min max direction
 
void GetBoundingBox2d (const std::shared_ptr< base::Object > &object, base::PointCloud< base::PointD > *box, double expand=0.0)
 Get the Bounding Box vertices and save in polygon type
 
void ComputeObjectShapeFromPolygon (std::shared_ptr< base::Object > object, bool use_world_cloud=false)
 compute object shape(center, size) from given direction and polygon
 
void SetSemanticLabel (PointSemanticLabel label, uint8_t *value)
 
PointSemanticLabel GetSemanticLabel (uint8_t value)
 
bool IsSemanticLabelEqual (PointSemanticLabel label, uint8_t value)
 
void SetMotionLabel (PointMotionLabel label, uint8_t *value)
 
PointMotionLabel GetMotionLabel (uint8_t value)
 
bool IsMotionLabelEqual (PointMotionLabel label, uint8_t value)
 
bool LoadPCLPCD (const std::string &file_path, base::PointFCloud *cloud_out)
 
bool WritePcdByLabel (const std::string &file_path, const base::PointFCloud &cloud, const LidarPointLabel &label)
 
template<typename PointT >
void TransformToPCLXYZI (const base::AttributePointCloud< PointT > &org_cloud, const pcl::PointCloud< pcl::PointXYZI >::Ptr &out_cloud_ptr)
 
void TransformFromPCLXYZI (const pcl::PointCloud< pcl::PointXYZI >::Ptr &org_cloud_ptr, const base::PointFCloudPtr &out_cloud_ptr)
 
void DownSampleCloudByVoxelGrid (const pcl::PointCloud< pcl::PointXYZI >::Ptr &cloud_ptr, const pcl::PointCloud< pcl::PointXYZI >::Ptr &filtered_cloud_ptr, float lx=0.01f, float ly=0.01f, float lz=0.01f)
 
template<typename PointT >
void DownSampleCloudByVoxelGrid (const typename pcl::PointCloud< PointT >::Ptr &input_cloud_ptr, typename pcl::PointCloud< PointT >::Ptr output_cloud_ptr, float lx=0.01f, float ly=0.01f, float lz=0.01f)
 
template<typename PointT >
void FilterPointsOutsideRange (const typename pcl::PointCloud< PointT >::Ptr &input_cloud_ptr, const std::string &filter_axis, const double &limit_min, const double &limit_max, typename pcl::PointCloud< PointT >::Ptr output_cloud_ptr)
 
template<typename PointT >
void LoadPointCloud (const std::string &filename, typename pcl::PointCloud< PointT >::Ptr point_cloud)
 
template<typename PointT >
void DownSamplePointCloud (const typename pcl::PointCloud< PointT >::Ptr &intput_cloud_ptr, typename pcl::PointCloud< PointT >::Ptr out_cloud_ptr, int num_points)
 
uint32_t GetIndex (uint32_t r, uint32_t c, uint32_t cols)
 
 PERCEPTION_REGISTER_SCENESERVICECONTENT (GroundServiceContent)
 
 PERCEPTION_REGISTER_SCENESERVICE (GroundService)
 
 PERCEPTION_REGISTER_SCENESERVICECONTENT (ROIServiceContent)
 
 PERCEPTION_REGISTER_SCENESERVICE (ROIService)
 
 PERCEPTION_REGISTER_REGISTERER (SceneServiceContent)
 
 PERCEPTION_REGISTER_REGISTERER (SceneService)
 
float get_3Dbox_iou_len (float center1, float len1, float center2, float len2)
 
float get_3dbox_iou (base::ObjectPtr obj1, base::ObjectPtr obj2)
 
 PERCEPTION_REGISTER_LIDARDETECTOR (CenterPointDetection)
 
 PERCEPTION_REGISTER_LIDARDETECTOR (CNNSegmentation)
 
template<class T >
void DisjointSetMakeSet (T *x)
 
template<class T >
T * DisjointSetFindRecursive (T *x)
 
template<class T >
T * DisjointSetFindLoop (T *x)
 
template<class T >
T * DisjointSetFind (T *x)
 
template<class T >
void DisjointSetMerge (T *x, const T *y)
 
template<class T >
void DisjointSetUnion (T *x, T *y)
 
int F2I (float val, float ori, float scale)
 
void GroupPc2Pixel (float pc_x, float pc_y, float scale, float range, int *x, int *y)
 
int Pc2Pixel (float in_pc, float in_range, float out_size)
 
float Pixel2Pc (int in_pixel, float in_size, float out_range)
 
 PERCEPTION_REGISTER_LIDARDETECTOR (MaskPillarsDetection)
 
void GPUAssert (cudaError_t code, const char *file, int line, bool abort=true)
 
 PERCEPTION_REGISTER_LIDARDETECTOR (PointPillarsDetection)
 
 PERCEPTION_REGISTER_REGISTERER (BaseLidarDetector)
 
 CYBER_REGISTER_COMPONENT (LidarDetectionComponent)
 
 CYBER_REGISTER_COMPONENT (LidarDetectionFilterComponent)
 
 CYBER_REGISTER_COMPONENT (LidarOutputComponent)
 
 PERCEPTION_REGISTER_ONESHOTTYPEFUSION (CCRFOneShotTypeFusion)
 
 PERCEPTION_REGISTER_SEQUENCETYPEFUSION (CCRFSequenceTypeFusion)
 
 PERCEPTION_REGISTER_CLASSIFIER (FusedClassifier)
 
 PERCEPTION_REGISTER_REGISTERER (BaseOneShotTypeFusion)
 
 PERCEPTION_REGISTER_REGISTERER (BaseSequenceTypeFusion)
 
 PERCEPTION_REGISTER_REGISTERER (BaseBipartiteGraphMatcher)
 
 PERCEPTION_REGISTER_REGISTERER (BaseClassifier)
 
 PERCEPTION_REGISTER_REGISTERER (BaseMultiTargetTracker)
 
 CYBER_REGISTER_COMPONENT (LidarTrackingComponent)
 
float EuclideanDistance (const TrackedObjectConstPtr &last_object, const Eigen::VectorXf &track_predict, const TrackedObjectConstPtr &new_object, const double time_diff)
 : compute euclidean distance for given track & object
 
float LocationDistance (const TrackedObjectConstPtr &last_object, const Eigen::VectorXf &track_predict, const TrackedObjectConstPtr &new_object, const double time_diff)
 Compute location distance for given track & object
 
float DirectionDistance (const TrackedObjectConstPtr &last_object, const Eigen::VectorXf &track_predict, const TrackedObjectConstPtr &new_object, const double time_diff)
 Compute direction distance for given track & object
 
float BboxSizeDistance (const TrackedObjectConstPtr &last_object, const Eigen::VectorXf &track_predict, const TrackedObjectConstPtr &new_object, const double time_diff)
 Compute bbox size distance for given track & object
 
float PointNumDistance (const TrackedObjectConstPtr &last_object, const Eigen::VectorXf &track_predict, const TrackedObjectConstPtr &new_object, const double time_diff)
 Compute point num distance for given track & object
 
float HistogramDistance (const TrackedObjectConstPtr &last_object, const Eigen::VectorXf &track_predict, const TrackedObjectConstPtr &new_object, const double time_diff)
 Compute histogram distance for given track & object
 
float CentroidShiftDistance (const TrackedObjectConstPtr &last_object, const Eigen::VectorXf &track_predict, const TrackedObjectConstPtr &cur_obj, const double time_diff)
 Compute centroid shift distance for object and background match
 
float BboxIouDistance (const TrackedObjectConstPtr &last_object, const Eigen::VectorXf &track_predict, const TrackedObjectConstPtr &cur_obj, const double time_diff, double match_threshold)
 Compute bbox iou distance for object and background match
 
bool operator< (const MatchCost &m1, const MatchCost &m2)
 
std::ostream & operator<< (std::ostream &os, const MatchCost &m)
 
 PERCEPTION_REGISTER_BIPARTITEGRAPHMATCHER (GnnBipartiteGraphMatcher)
 
 PERCEPTION_REGISTER_BIPARTITEGRAPHMATCHER (MultiHmBipartiteGraphMatcher)
 
void RemoveStaleDataFromMap (double timestamp, std::map< double, TrackedObjectPtr > *data)
 
void MeasureAnchorPointVelocity (TrackedObjectPtr new_object, const TrackedObjectConstPtr &old_object, const double &time_diff)
 Measure anchor point velocity
 
void MeasureBboxCenterVelocity (TrackedObjectPtr new_object, const TrackedObjectConstPtr &old_object, const double &time_diff)
 Measure bbox center velocity
 
void MeasureBboxCenterHistoryVelocity (const MlfTrackDataConstPtr &track_data, TrackedObjectPtr new_object)
 
void MeasureBboxCornerVelocity (TrackedObjectPtr new_object, const TrackedObjectConstPtr &old_object, const double &time_diff)
 Measure bbox corner velocity
 
void MeasureBboxCornerHistoryVelocity (const MlfTrackDataConstPtr &track_data, TrackedObjectPtr new_object)
 
void ComputeBboxCornerHistoryVelocity (TrackedObjectPtr new_object, const TrackedObjectConstPtr &old_object, const double &time_diff, TrackedObjectPtr curr_object)
 
void MeasureObjectDetectionVelocity (TrackedObjectPtr new_object, const TrackedObjectConstPtr &old_object, const double &time_diff)
 Measure object-detection center and corner velocity
 
void MeasureObjectDetectionHistoryVelocity (const MlfTrackDataConstPtr &track_data, TrackedObjectPtr new_object)
 
 PERCEPTION_REGISTER_REGISTERER (MlfBaseFilter)
 
 PERCEPTION_REGISTER_MULTITARGET_TRACKER (MlfEngine)
 
 PERCEPTION_REGISTER_MLFFILTER (MlfMotionFilter)
 
 PERCEPTION_REGISTER_MLFFILTER (MlfShapeFilter)
 
 PERCEPTION_REGISTER_MLFFILTER (MlfTypeFilter)
 
bool JudgeBlindTrafficCone (const MlfTrackDataConstPtr &track_data, double frame_timestamp, const Eigen::Vector3d &local_to_global_offset, Eigen::Affine3d &lidar2world_pose, Eigen::Affine3d &lidar2novatel_pose)
 
 PERCEPTION_REGISTER_ONESHOTTYPEFUSION (CCRFSingleShotTypeFusion)
 
 PERCEPTION_REGISTER_SEQUENCETYPEFUSION (CCRFMultiShotTypeFusion)
 
 PERCEPTION_REGISTER_REGISTERER (BaseSingleShotTypeFusion)
 
 PERCEPTION_REGISTER_REGISTERER (BaseMultiShotTypeFusion)
 
 PERCEPTION_REGISTER_GROUNDDETECTOR (GroundServiceDetector)
 
 PERCEPTION_REGISTER_GROUNDDETECTOR (SpatioTemporalGroundDetector)
 
 PERCEPTION_REGISTER_REGISTERER (BaseGroundDetector)
 
 CYBER_REGISTER_COMPONENT (PointCloudGroundDetectComponent)
 
 CYBER_REGISTER_COMPONENT (PointCloudMapROIComponent)
 
template<typename T >
bool DrawPolygonMask (const typename PolygonScanCvter< T >::Polygon &polygon, Bitmap2D *bitmap, const double extend_dist=0.0, const bool no_edge_table=false)
 
template<typename T >
bool DrawPolygonsMask (const std::vector< typename PolygonScanCvter< T >::Polygon > &polygons, Bitmap2D *bitmap, const double extend_dist=0.0, const bool no_edge_table=false)
 
 PERCEPTION_REGISTER_REGISTERER (BasePointCloudPreprocessor)
 
 CYBER_REGISTER_COMPONENT (PointCloudPreprocessComponent)
 
 PERCEPTION_REGISTER_POINTCLOUDPREPROCESSOR (PointCloudPreprocessor)
 

变量

struct apollo::perception::lidar::PCLPointXYZIT EIGEN_ALIGN16
 
const double kPI = 3.1415926535897932384626433832795
 
const float STATIC_VELOCITY = 0.01
 

类型定义说明

◆ CPoint

typedef pcl::PointXYZRGB apollo::perception::lidar::CPoint

在文件 pcl_util.h32 行定义.

◆ CPointCloud

在文件 pcl_util.h33 行定义.

◆ CPointCloudConstPtr

typedef pcl::PointCloud<CPoint>::ConstPtr apollo::perception::lidar::CPointCloudConstPtr

在文件 pcl_util.h35 行定义.

◆ CPointCloudPtr

typedef pcl::PointCloud<CPoint>::Ptr apollo::perception::lidar::CPointCloudPtr

在文件 pcl_util.h34 行定义.

◆ DirectionMajor

◆ GroundServiceConstPtr

在文件 ground_service.h110 行定义.

◆ GroundServiceContentConstPtr

◆ GroundServiceContentPtr

◆ GroundServicePtr

在文件 ground_service.h109 行定义.

◆ LidarFramePool

◆ Matrixd

在文件 util.h40 行定义.

◆ MlfTrackDataConstPtr

在文件 mlf_track_data.h183 行定义.

◆ MlfTrackDataPool

◆ MlfTrackDataPtr

在文件 mlf_track_data.h182 行定义.

◆ ObjectPtr

◆ PointFCloud

◆ Polygon

template<typename T >
using apollo::perception::lidar::Polygon = typedef typename PolygonScanCvter<T>::Polygon

在文件 hdmap_roi_filter.cc36 行定义.

◆ PolygonDType

◆ ROIServiceConstPtr

在文件 roi_service.h98 行定义.

◆ ROIServiceContentConstPtr

在文件 roi_service.h95 行定义.

◆ ROIServiceContentPtr

在文件 roi_service.h94 行定义.

◆ ROIServicePtr

在文件 roi_service.h97 行定义.

◆ SceneServiceConstPtr

在文件 scene_service.h101 行定义.

◆ SceneServiceContentConstPtr

在文件 scene_service.h60 行定义.

◆ SceneServiceContentPtr

◆ SceneServicePtr

在文件 scene_service.h100 行定义.

◆ SppClusterConstPtr

在文件 spp_cluster.h132 行定义.

◆ SppClusterPool

◆ SppClusterPtr

在文件 spp_cluster.h131 行定义.

◆ SppLabelImageConstPtr

在文件 spp_label_image.h149 行定义.

◆ SppLabelImagePtr

在文件 spp_label_image.h148 行定义.

◆ TrackDataConstPtr

在文件 track_data.h155 行定义.

◆ TrackDataPool

◆ TrackDataPtr

在文件 track_data.h154 行定义.

◆ TrackedObjectConstPtr

在文件 tracked_object.h221 行定义.

◆ TrackedObjectPool

◆ TrackedObjectPtr

在文件 tracked_object.h220 行定义.

◆ Vectord

typedef Eigen::Matrix< double, VALID_OBJECT_TYPE, 1 > apollo::perception::lidar::Vectord

在文件 util.h38 行定义.

◆ Vectori

typedef Eigen::Matrix< int, VALID_OBJECT_TYPE, 1 > apollo::perception::lidar::Vectori

在文件 util.h39 行定义.

枚举类型说明

◆ anonymous enum

anonymous enum
枚举值
VALID_OBJECT_TYPE 

在文件 util.h34 行定义.

34 {
35 VALID_OBJECT_TYPE = static_cast<int>(base::ObjectType::MAX_OBJECT_TYPE) - 2
36};

◆ anonymous enum

anonymous enum
枚举值
VALID_OBJECT_TYPE 

在文件 util.h34 行定义.

34 {
35 VALID_OBJECT_TYPE = static_cast<int>(base::ObjectType::MAX_OBJECT_TYPE) - 2
36};

◆ LidarErrorCode

◆ LidarPointLabel

枚举值
UNKNOWN 
ROI 
GROUND 
OBJECT 
MAX_LABEL 

在文件 lidar_point_label.h22 行定义.

22 {
23 UNKNOWN = 0,
24 ROI = 1,
25 GROUND = 2,
26 OBJECT = 3,
28}; // enum class LidarPointLabel

◆ MetaType

枚举值
META_UNKNOWN 
META_SMALLMOT 
META_BIGMOT 
META_NONMOT 
META_PEDESTRIAN 
MAX_META_TYPE 

在文件 util.h22 行定义.

◆ MotionState

枚举值
STATIC 
SKEPTICAL_MOVE 
TRUSTED_MOVE 

在文件 track_data.h29 行定义.

◆ PointMotionLabel

枚举值
UNKNOWN 
MOVING 
STATIONARY 
MAX_LABEL 

在文件 lidar_point_label.h43 行定义.

43 {
44 UNKNOWN = 0,
45 MOVING = 1,
46 STATIONARY = 2,
48}; // enum class PointMotionLabel

◆ PointSemanticLabel

枚举值
UNKNOWN 
IGNORE 
GROUND 
OBJECT 
CURB 
VEGETATION 
FENCE 
NOISE 
WALL 
MAX_LABEL 

在文件 lidar_point_label.h30 行定义.

30 {
31 UNKNOWN = 0,
32 IGNORE = 1,
33 GROUND = 2,
34 OBJECT = 3,
35 CURB = 4,
36 VEGETATION = 5,
37 FENCE = 6,
38 NOISE = 7,
39 WALL = 8,
41}; // enum class PointSemanticLabel

◆ SppClassType

枚举值
OTHERS 
SMALLMOT 
BIGMOT 
CYCLIST 
PEDESTRIAN 
CONE 
MAX_TYPE 

在文件 spp_cluster.h30 行定义.

30 {
31 OTHERS = 0,
32 SMALLMOT = 1,
33 BIGMOT = 2,
34 CYCLIST = 3,
35 PEDESTRIAN = 4,
36 CONE = 5,
37 MAX_TYPE = 6,
38};

函数说明

◆ __attribute__()

apollo::perception::lidar::__attribute__ ( (constructor)  )

在文件 lidar_frame_pool.cc25 行定义.

25 {
26 LidarFramePool::Instance();
27 AINFO << "Initialize lidar frame pool.";
28}
#define AINFO
Definition log.h:42

◆ BboxIouDistance()

float apollo::perception::lidar::BboxIouDistance ( const TrackedObjectConstPtr last_object,
const Eigen::VectorXf &  track_predict,
const TrackedObjectConstPtr cur_obj,
const double  time_diff,
double  match_threshold 
)

Compute bbox iou distance for object and background match

参数
last_objectobject for computing distance
track_predictunused
cur_objnew detected object for computing distance
time_diffunused
match_thresholdmatch threshold
返回
float distance

在文件 distance_collection.cc202 行定义.

205 {
206 // Step 1: unify bbox direction, change the one with less pts,
207 // for efficiency.
208 Eigen::Vector3f old_dir = last_object->output_direction.cast<float>();
209 Eigen::Vector3f old_size = last_object->output_size.cast<float>();
210 Eigen::Vector3d old_center = last_object->output_center;
211 Eigen::Vector3f new_dir = new_object->direction.cast<float>();
212 Eigen::Vector3f new_size = new_object->size.cast<float>();
213 Eigen::Vector3d new_center = new_object->center;
214 old_dir.normalize();
215 new_dir.normalize();
216 // handle randomness
217 old_size(0) = old_size(0) > 0.3f ? old_size(0) : 0.3f;
218 old_size(1) = old_size(1) > 0.3f ? old_size(1) : 0.3f;
219 new_size(0) = new_size(0) > 0.3f ? new_size(0) : 0.3f;
220 new_size(1) = new_size(1) > 0.3f ? new_size(1) : 0.3f;
221 int last_object_num_pts = static_cast<int>(
222 (last_object->object_ptr->lidar_supplement).cloud_world.size());
223 int cur_obj_num_pts = static_cast<int>(
224 (new_object->object_ptr->lidar_supplement).cloud_world.size());
225 bool change_cur_obj_bbox = last_object_num_pts > cur_obj_num_pts;
226 float minimum_edge_length = 0.01f;
227 base::PointDCloud& cloud =
228 (new_object->object_ptr->lidar_supplement).cloud_world;
229 if (change_cur_obj_bbox) {
230 new_dir = old_dir;
231 algorithm::CalculateBBoxSizeCenter2DXY(
232 cloud, new_dir, &new_size, &new_center, minimum_edge_length);
233 } else {
234 old_dir = new_dir;
235 algorithm::CalculateBBoxSizeCenter2DXY(
236 cloud, old_dir, &old_size, &old_center, minimum_edge_length);
237 }
238 // Step 2: compute 2d iou bbox to bbox
239 Eigen::Matrix2d trans_mat;
240 trans_mat(0, 0) = (old_dir.cast<double>())(0);
241 trans_mat(0, 1) = (old_dir.cast<double>())(1);
242 trans_mat(1, 0) = -(old_dir.cast<double>())(1);
243 trans_mat(1, 1) = (old_dir.cast<double>())(0);
244 Eigen::Vector2d old_center_transformed_2d =
245 static_cast<Eigen::Matrix<double, 2, 1, 0, 2, 1>>(trans_mat *
246 old_center.head(2));
247 Eigen::Vector2d new_center_transformed_2d =
248 static_cast<Eigen::Matrix<double, 2, 1, 0, 2, 1>>(trans_mat *
249 new_center.head(2));
250 old_center(0) = old_center_transformed_2d(0);
251 old_center(1) = old_center_transformed_2d(1);
252 new_center(0) = new_center_transformed_2d(0);
253 new_center(1) = new_center_transformed_2d(1);
254 Eigen::Vector3d old_size_tmp = old_size.cast<double>();
255 Eigen::Vector3d new_size_tmp = new_size.cast<double>();
256 double iou = algorithm::CalculateIou2DXY<double>(old_center, old_size_tmp,
257 new_center, new_size_tmp);
258 // Step 4: compute dist
259 double dist = (1 - iou) * match_threshold;
260 return static_cast<float>(dist);
261}

◆ BboxSizeDistance()

float apollo::perception::lidar::BboxSizeDistance ( const TrackedObjectConstPtr last_object,
const Eigen::VectorXf &  track_predict,
const TrackedObjectConstPtr new_object,
const double  time_diff 
)

Compute bbox size distance for given track & object

参数
last_objectobject for computing distance
track_predictpredicted state of track for computing distance
new_objectnew detected object for computing distance
time_difftime interval from last matching
返回
float distance

在文件 distance_collection.cc111 行定义.

114 {
115 // Compute bbox size distance for last object and new object
116 // range from 0 to 1
117
118 Eigen::Vector3f old_bbox_dir = last_object->output_direction.cast<float>();
119 Eigen::Vector3f new_bbox_dir = new_object->direction.cast<float>();
120 Eigen::Vector3f old_bbox_size = last_object->output_size.cast<float>();
121 Eigen::Vector3f new_bbox_size = new_object->size.cast<float>();
122
123 float size_dist = 0.0f;
124 double dot_val_00 = fabs(old_bbox_dir(0) * new_bbox_dir(0) +
125 old_bbox_dir(1) * new_bbox_dir(1));
126 double dot_val_01 = fabs(old_bbox_dir(0) * new_bbox_dir(1) -
127 old_bbox_dir(1) * new_bbox_dir(0));
128 float temp_val_0 = 0.0f;
129 float temp_val_1 = 0.0f;
130 if (dot_val_00 > dot_val_01) {
131 temp_val_0 = static_cast<float>(fabs(old_bbox_size(0) - new_bbox_size(0))) /
132 std::max(old_bbox_size(0), new_bbox_size(0));
133 temp_val_1 = static_cast<float>(fabs(old_bbox_size(1) - new_bbox_size(1))) /
134 std::max(old_bbox_size(1), new_bbox_size(1));
135 size_dist = std::min(temp_val_0, temp_val_1);
136 } else {
137 temp_val_0 = static_cast<float>(fabs(old_bbox_size(0) - new_bbox_size(1))) /
138 std::max(old_bbox_size(0), new_bbox_size(1));
139 temp_val_1 = static_cast<float>(fabs(old_bbox_size(1) - new_bbox_size(0))) /
140 std::max(old_bbox_size(1), new_bbox_size(0));
141 size_dist = std::min(temp_val_0, temp_val_1);
142 }
143
144 return size_dist;
145}

◆ CentroidShiftDistance()

float apollo::perception::lidar::CentroidShiftDistance ( const TrackedObjectConstPtr last_object,
const Eigen::VectorXf &  track_predict,
const TrackedObjectConstPtr cur_obj,
const double  time_diff 
)

Compute centroid shift distance for object and background match

参数
last_objectobject for computing distance
track_predictunused
cur_objnew detected object for computing distance
time_diffunused
返回
float distance

在文件 distance_collection.cc192 行定义.

195 {
196 float dist = static_cast<float>(
197 (last_object->barycenter.head(2) - new_object->barycenter.head(2))
198 .norm());
199 return dist;
200}

◆ ComputeBboxCornerHistoryVelocity()

void apollo::perception::lidar::ComputeBboxCornerHistoryVelocity ( TrackedObjectPtr  new_object,
const TrackedObjectConstPtr old_object,
const double &  time_diff,
TrackedObjectPtr  curr_object 
)

在文件 measurement_collection.cc237 行定义.

239 {
240 // Compute 2D bbxo corner velocity measurement
241 Eigen::Vector3f old_dir_tmp = old_object->output_direction.cast<float>();
242 Eigen::Vector3d old_size = old_object->output_size;
243 Eigen::Vector3d old_center = old_object->output_center;
244 Eigen::Vector3f new_size_tmp;
245 Eigen::Vector3d new_center;
246 float minimum_edge_length = 0.01f;
247 base::PointDCloud& cloud =
248 (new_object->object_ptr->lidar_supplement).cloud_world;
249 algorithm::CalculateBBoxSizeCenter2DXY(
250 cloud, old_dir_tmp, &new_size_tmp, &new_center, minimum_edge_length);
251 Eigen::Vector3d old_dir = old_dir_tmp.cast<double>();
252 Eigen::Vector3d new_size = new_size_tmp.cast<double>();
253 Eigen::Vector3d ortho_old_dir(-old_dir(1), old_dir(0), 0.0);
254 Eigen::Vector3d old_bbox_corner_list[4];
255 Eigen::Vector3d new_bbox_corner_list[4];
256 Eigen::Vector3d old_bbox_corner = old_center + old_dir * old_size(0) * 0.5
257 + ortho_old_dir * old_size(1) * 0.5;
258 Eigen::Vector3d new_bbox_corner = new_center + old_dir * new_size(0) * 0.5
259 + ortho_old_dir * new_size(1) * 0.5;
260 old_bbox_corner_list[0] = old_bbox_corner;
261 new_bbox_corner_list[0] = new_bbox_corner;
262 old_bbox_corner = old_center - old_dir * old_size(0) * 0.5 +
263 ortho_old_dir * old_size(1) * 0.5;
264 new_bbox_corner = new_center - old_dir * new_size(0) * 0.5 +
265 ortho_old_dir * new_size(1) * 0.5;
266 old_bbox_corner_list[1] = old_bbox_corner;
267 new_bbox_corner_list[1] = new_bbox_corner;
268 old_bbox_corner = old_center + old_dir * old_size(0) * 0.5 -
269 ortho_old_dir * old_size(1) * 0.5;
270 new_bbox_corner = new_center + old_dir * new_size(0) * 0.5 -
271 ortho_old_dir * new_size(1) * 0.5;
272 old_bbox_corner_list[2] = old_bbox_corner;
273 new_bbox_corner_list[2] = new_bbox_corner;
274 old_bbox_corner = old_center - old_dir * old_size(0) * 0.5 -
275 ortho_old_dir * old_size(1) * 0.5;
276 new_bbox_corner = new_center - old_dir * new_size(0) * 0.5 -
277 ortho_old_dir * new_size(1) * 0.5;
278 old_bbox_corner_list[3] = old_bbox_corner;
279 new_bbox_corner_list[3] = new_bbox_corner;
280
281 // select project_dir by change of size
282 Eigen::Vector3d direct_old_size = old_object->size;
283 Eigen::Vector3d direct_new_size = new_object->size;
284 double length_change =
285 fabs(direct_old_size(0) - direct_new_size(0)) / direct_old_size(0);
286 double width_change =
287 fabs(direct_old_size(1) - direct_new_size(1)) / direct_old_size(1);
288
289 const double max_change_thres = 0.1;
290 Eigen::Vector3d project_dir;
291 if (length_change < max_change_thres && width_change < max_change_thres) {
292 project_dir = new_object->center - old_object->center;
293 } else {
294 project_dir = new_object->anchor_point - old_object->belief_anchor_point;
295 }
296 for (size_t i = 0; i < 4; ++i) {
297 old_bbox_corner = old_bbox_corner_list[i];
298 new_bbox_corner = new_bbox_corner_list[i];
299 Eigen::Vector3d bbox_corner_velocity =
300 ((new_bbox_corner - old_bbox_corner) / time_diff);
301 Eigen::Vector3d bbox_corner_velocity_on_project_dir =
302 algorithm::Calculate2DXYProjectVector<double>(bbox_corner_velocity,
303 project_dir);
304 // set velocity as 0 when conflict
305 if (bbox_corner_velocity_on_project_dir.dot(project_dir) <= 0) {
306 bbox_corner_velocity_on_project_dir = Eigen::Vector3d::Zero();
307 }
308 curr_object->measured_history_corners_velocity[i] =
309 bbox_corner_velocity_on_project_dir;
310 }
311}

◆ ComputeMinMaxDirectionPoint()

void apollo::perception::lidar::ComputeMinMaxDirectionPoint ( const base::ObjectPtr object,
const Eigen::Vector3d &  ref_center,
size_t *  max_point_index,
size_t *  min_point_index 
)

Compute min max direction

参数
objectnew object
ref_centerview point
max_point_indexmax point index
min_point_indexmin point index

在文件 lidar_object_util.cc216 行定义.

220 {
221 Eigen::Vector3d p_0;
222 p_0[0] = object->polygon[0].x;
223 p_0[1] = object->polygon[0].y;
224 p_0[2] = object->polygon[0].z;
225 Eigen::Vector3d max_point = p_0 - ref_center;
226 Eigen::Vector3d min_point = p_0 - ref_center;
227 for (size_t i = 1; i < object->polygon.size(); ++i) {
228 Eigen::Vector3d p;
229 p[0] = object->polygon[i].x;
230 p[1] = object->polygon[i].y;
231 p[2] = object->polygon[i].z;
232 Eigen::Vector3d ray = p - ref_center;
233 // clock direction
234 if (max_point[0] * ray[1] - ray[0] * max_point[1] < kEpsilon) {
235 max_point = ray;
236 *max_point_index = i;
237 }
238 // unclock direction
239 if (min_point[0] * ray[1] - ray[0] * min_point[1] > kEpsilon) {
240 min_point = ray;
241 *min_point_index = i;
242 }
243 }
244}

◆ ComputeObjectShapeFromPolygon() [1/2]

void apollo::perception::lidar::ComputeObjectShapeFromPolygon ( std::shared_ptr< base::Object object,
bool  use_world_cloud = false 
)

compute object shape(center, size) from given direction and polygon

参数
objectobject, center and size will be updated
use_world_cloudwhether use world cloud or local cloud

◆ ComputeObjectShapeFromPolygon() [2/2]

void apollo::perception::lidar::ComputeObjectShapeFromPolygon ( std::shared_ptr< Object object,
bool  use_world_cloud 
)

在文件 lidar_object_util.cc63 行定义.

64 {
65 const PointCloud<PointD>& polygon = object->polygon;
66 const PointCloud<PointF>& cloud = object->lidar_supplement.cloud;
67 const PointCloud<PointD>& world_cloud = object->lidar_supplement.cloud_world;
68
69 if (polygon.empty() || cloud.empty()) {
70 AINFO << "Failed to compute box, polygon size: " << polygon.size()
71 << " cloud size: " << cloud.size();
72 return;
73 }
74
75 // note here we assume direction is not changed
76 Eigen::Vector2d polygon_xy;
77 Eigen::Vector2d projected_polygon_xy;
78 Eigen::Vector3d raw_direction = object->direction.cast<double>();
79 Eigen::Vector2d direction = raw_direction.head<2>();
80 Eigen::Vector2d odirection(-direction(1), direction(0));
81
82 constexpr double kDoubleMax = std::numeric_limits<double>::max();
83 Eigen::Vector2d min_polygon_xy(kDoubleMax, kDoubleMax);
84 Eigen::Vector2d max_polygon_xy(-kDoubleMax, -kDoubleMax);
85
86 // note we keep this offset to avoid numeric precision issues in world frame
87 Eigen::Vector2d offset(object->polygon[0].x, object->polygon[0].y);
88
89 for (const auto& point : object->polygon.points()) {
90 polygon_xy << point.x, point.y;
91 polygon_xy -= offset;
92 projected_polygon_xy(0) = direction.dot(polygon_xy);
93 projected_polygon_xy(1) = odirection.dot(polygon_xy);
94 min_polygon_xy(0) = std::min(min_polygon_xy(0), projected_polygon_xy(0));
95 min_polygon_xy(1) = std::min(min_polygon_xy(1), projected_polygon_xy(1));
96 max_polygon_xy(0) = std::max(max_polygon_xy(0), projected_polygon_xy(0));
97 max_polygon_xy(1) = std::max(max_polygon_xy(1), projected_polygon_xy(1));
98 }
99
100 double min_z = 0.0;
101 double max_z = 0.0;
102 if (use_world_cloud) {
103 min_z = world_cloud[0].z;
104 max_z = world_cloud[0].z;
105 for (const auto& point : world_cloud.points()) {
106 min_z = std::min(min_z, point.z);
107 max_z = std::max(max_z, point.z);
108 }
109 } else {
110 min_z = cloud[0].z;
111 max_z = cloud[0].z;
112 for (const auto& point : cloud.points()) {
113 min_z = std::min(min_z, static_cast<double>(point.z));
114 max_z = std::max(max_z, static_cast<double>(point.z));
115 }
116 }
117
118 // update size
119 object->size << static_cast<float>(max_polygon_xy(0) - min_polygon_xy(0)),
120 static_cast<float>(max_polygon_xy(1) - min_polygon_xy(1)),
121 static_cast<float>(max_z - min_z);
122 // for safety issues, set a default minmium value
123 object->size(0) = std::max(object->size(0), 0.01f);
124 object->size(1) = std::max(object->size(1), 0.01f);
125 object->size(2) = std::max(object->size(2), 0.01f);
126 // update center
127 projected_polygon_xy << (min_polygon_xy(0) + max_polygon_xy(0)) * 0.5,
128 (min_polygon_xy(1) + max_polygon_xy(1)) * 0.5;
129 polygon_xy = projected_polygon_xy(0) * direction +
130 projected_polygon_xy(1) * odirection;
131 object->center << polygon_xy(0) + offset(0), polygon_xy(1) + offset(1), min_z;
132}

◆ ComputePolygonDirection()

void apollo::perception::lidar::ComputePolygonDirection ( const Eigen::Vector3d &  ref_center,
const base::ObjectPtr object,
Eigen::Vector3f *  direction 
)

Compute polygon direction

参数
ref_centerview point
objectnew object
directionorintation

在文件 lidar_object_util.cc134 行定义.

137 {
138 if (object->polygon.size() == 0 ||
139 object->lidar_supplement.cloud.size() < 4u) {
140 return;
141 }
142 size_t max_point_index = 0;
143 size_t min_point_index = 0;
144 ComputeMinMaxDirectionPoint(
145 object, ref_center, &max_point_index, &min_point_index);
146 Eigen::Vector3d max_point(
147 object->polygon[max_point_index].x,
148 object->polygon[max_point_index].y,
149 object->polygon[max_point_index].z);
150 Eigen::Vector3d min_point(
151 object->polygon[min_point_index].x,
152 object->polygon[min_point_index].y,
153 object->polygon[min_point_index].z);
154 Eigen::Vector3d line = max_point - min_point;
155 double max_dis = 0;
156 bool vertices_in_vision = false;
157 size_t visible_max_start_point_index = 0;
158 size_t visible_max_end_point_index = 0;
159 for (size_t i = min_point_index, count = 0; count < object->polygon.size();
160 i = (i + 1) % object->polygon.size(), ++count) {
161 size_t j = (i + 1) % object->polygon.size();
162 Eigen::Vector3d p_i;
163 p_i[0] = object->polygon[i].x;
164 p_i[1] = object->polygon[i].y;
165 p_i[2] = object->polygon[i].z;
166 Eigen::Vector3d p_j;
167 p_j[0] = object->polygon[j].x;
168 p_j[1] = object->polygon[j].y;
169 p_j[2] = object->polygon[j].z;
170 Eigen::Vector3d ray;
171 if ((i == min_point_index && j == max_point_index) ||
172 (i == max_point_index && j == min_point_index)) {
173 continue;
174 } else {
175 if (j != min_point_index && j != max_point_index) {
176 ray = p_j - min_point;
177 } else { // j == min_point_index || j == max_point_index
178 ray = p_i - min_point;
179 }
180 if (line[0] * ray[1] - ray[0] * line[1] < kEpsilon) {
181 double dist = sqrt((p_j[0] - p_i[0]) * (p_j[0] - p_i[0]) +
182 (p_j[1] - p_i[1]) * (p_j[1] - p_i[1]));
183 if (dist > max_dis) {
184 max_dis = dist;
185 visible_max_start_point_index = i;
186 visible_max_end_point_index = j;
187 }
188 vertices_in_vision = true;
189 }
190 }
191 }
192 size_t start_point_index = 0;
193 size_t end_point_index = 0;
194 if (vertices_in_vision) {
195 start_point_index = visible_max_start_point_index;
196 end_point_index = visible_max_end_point_index;
197 } else {
198 start_point_index = min_point_index;
199 end_point_index = max_point_index;
200 }
201 Eigen::Vector3d start_point(
202 object->polygon[start_point_index].x,
203 object->polygon[start_point_index].y,
204 object->polygon[start_point_index].z);
205 Eigen::Vector3d end_point(
206 object->polygon[end_point_index].x,
207 object->polygon[end_point_index].y,
208 object->polygon[end_point_index].z);
209 Eigen::Vector3d dir = end_point - start_point;
210 *direction << static_cast<float>(dir[0]),
211 static_cast<float>(dir[1]),
212 static_cast<float>(dir[2]);
213 direction->normalize();
214}

◆ CYBER_REGISTER_COMPONENT() [1/7]

apollo::perception::lidar::CYBER_REGISTER_COMPONENT ( LidarDetectionComponent  )

◆ CYBER_REGISTER_COMPONENT() [2/7]

apollo::perception::lidar::CYBER_REGISTER_COMPONENT ( LidarDetectionFilterComponent  )

◆ CYBER_REGISTER_COMPONENT() [3/7]

apollo::perception::lidar::CYBER_REGISTER_COMPONENT ( LidarOutputComponent  )

◆ CYBER_REGISTER_COMPONENT() [4/7]

apollo::perception::lidar::CYBER_REGISTER_COMPONENT ( LidarTrackingComponent  )

◆ CYBER_REGISTER_COMPONENT() [5/7]

apollo::perception::lidar::CYBER_REGISTER_COMPONENT ( PointCloudGroundDetectComponent  )

◆ CYBER_REGISTER_COMPONENT() [6/7]

apollo::perception::lidar::CYBER_REGISTER_COMPONENT ( PointCloudMapROIComponent  )

◆ CYBER_REGISTER_COMPONENT() [7/7]

apollo::perception::lidar::CYBER_REGISTER_COMPONENT ( PointCloudPreprocessComponent  )

◆ DirectionDistance()

float apollo::perception::lidar::DirectionDistance ( const TrackedObjectConstPtr last_object,
const Eigen::VectorXf &  track_predict,
const TrackedObjectConstPtr new_object,
const double  time_diff 
)

Compute direction distance for given track & object

参数
last_objectobject for computing distance
track_predictpredicted state of track for computing distance
new_objectnew detected object for computing distance
time_difftime interval from last matching
返回
float distance

在文件 distance_collection.cc82 行定义.

85 {
86 // Compute direction distance for last object and new object
87 // range from 0 to 2
88
89 Eigen::Vector3f old_anchor_point =
90 (last_object->belief_anchor_point).cast<float>();
91 Eigen::Vector3f new_anchor_point = (new_object->anchor_point).cast<float>();
92 Eigen::Vector3f anchor_point_shift_dir = new_anchor_point - old_anchor_point;
93 anchor_point_shift_dir[2] = 0.0;
94
95 Eigen::Vector3f track_motion_dir = track_predict.head(6).tail(3);
96 track_motion_dir[2] = 0.0;
97
98 double cos_theta = 0.994; // average cos
99 if (!track_motion_dir.head(2).isZero() &&
100 !anchor_point_shift_dir.head(2).isZero()) {
101 // cos_theta = vector_cos_theta_2d_xy(track_motion_dir,
102 // anchor_point_shift_dir);
103 cos_theta = algorithm::CalculateCosTheta2DXY<float>(track_motion_dir,
104 anchor_point_shift_dir);
105 }
106 float direction_dist = static_cast<float>(-cos_theta) + 1.0f;
107
108 return direction_dist;
109}

◆ DisjointSetFind()

template<class T >
T * apollo::perception::lidar::DisjointSetFind ( T *  x)

在文件 disjoint_set.h55 行定义.

55 {
56 T* y = x->parent;
57 if (y == x || y->parent == y) {
58 return y;
59 }
60 T* root = DisjointSetFindLoop(y->parent);
61 x->parent = root;
62 y->parent = root;
63 return root;
64}

◆ DisjointSetFindLoop()

template<class T >
T * apollo::perception::lidar::DisjointSetFindLoop ( T *  x)

在文件 disjoint_set.h37 行定义.

37 {
38 T* y = x;
39 while (y->parent != y) {
40 y = y->parent;
41 }
42
43 T* w = x;
44 T* temp = x;
45 while (w->parent != w) {
46 temp = w->parent;
47 w->parent = y;
48 w = temp;
49 }
50
51 return y;
52}

◆ DisjointSetFindRecursive()

template<class T >
T * apollo::perception::lidar::DisjointSetFindRecursive ( T *  x)

在文件 disjoint_set.h29 行定义.

29 {
30 if (x->parent != x) {
31 x->parent = DisjointSetFindRecursive(x->parent);
32 }
33 return x->parent;
34}

◆ DisjointSetMakeSet()

template<class T >
void apollo::perception::lidar::DisjointSetMakeSet ( T *  x)

在文件 disjoint_set.h23 行定义.

23 {
24 x->parent = x;
25 x->node_rank = 0;
26}

◆ DisjointSetMerge()

template<class T >
void apollo::perception::lidar::DisjointSetMerge ( T *  x,
const T *  y 
)

在文件 disjoint_set.h67 行定义.

67{}

◆ DisjointSetUnion()

template<class T >
void apollo::perception::lidar::DisjointSetUnion ( T *  x,
T *  y 
)

在文件 disjoint_set.h70 行定义.

70 {
71 x = DisjointSetFind(x);
72 y = DisjointSetFind(y);
73 if (x == y) {
74 return;
75 }
76 if (x->node_rank < y->node_rank) {
77 x->parent = y;
78 // DisjointSetMerge(y, x);
79 } else if (y->node_rank < x->node_rank) {
80 y->parent = x;
81 // DisjointSetMerge(x, y);
82 } else {
83 y->parent = x;
84 x->node_rank++;
85 // DisjointSetMerge(x, y);
86 }
87}

◆ DownSampleCloudByVoxelGrid() [1/2]

void apollo::perception::lidar::DownSampleCloudByVoxelGrid ( const pcl::PointCloud< pcl::PointXYZI >::Ptr &  cloud_ptr,
const pcl::PointCloud< pcl::PointXYZI >::Ptr &  filtered_cloud_ptr,
float  lx = 0.01f,
float  ly = 0.01f,
float  lz = 0.01f 
)
inline

在文件 pcl_util.h128 行定义.

131 {
132 pcl::VoxelGrid<pcl::PointXYZI> voxel_grid;
133 voxel_grid.setInputCloud(cloud_ptr);
134 voxel_grid.setLeafSize(lx, ly, lz);
135 voxel_grid.filter(*filtered_cloud_ptr);
136}

◆ DownSampleCloudByVoxelGrid() [2/2]

template<typename PointT >
void apollo::perception::lidar::DownSampleCloudByVoxelGrid ( const typename pcl::PointCloud< PointT >::Ptr &  input_cloud_ptr,
typename pcl::PointCloud< PointT >::Ptr  output_cloud_ptr,
float  lx = 0.01f,
float  ly = 0.01f,
float  lz = 0.01f 
)

在文件 pointcloud_util.h46 行定义.

49 {
50 pcl::VoxelGrid<PointT> voxel_grid;
51 voxel_grid.setInputCloud(input_cloud_ptr);
52 voxel_grid.setLeafSize(lx, ly, lz);
53 voxel_grid.filter(*output_cloud_ptr);
54}

◆ DownSamplePointCloud()

template<typename PointT >
void apollo::perception::lidar::DownSamplePointCloud ( const typename pcl::PointCloud< PointT >::Ptr &  intput_cloud_ptr,
typename pcl::PointCloud< PointT >::Ptr  out_cloud_ptr,
int  num_points 
)

在文件 pointcloud_util.h81 行定义.

83 {
84 if (num_points <= 0) {
85 std::cerr << "Invalid number of points to downsample: " << num_points
86 << std::endl;
87 }
88
89 pcl::RandomSample<PointT> sampler;
90 sampler.setInputCloud(intput_cloud_ptr);
91 sampler.setSample(num_points);
92 sampler.filter(*out_cloud_ptr);
93}

◆ DrawPolygonMask()

template<typename T >
bool apollo::perception::lidar::DrawPolygonMask ( const typename PolygonScanCvter< T >::Polygon polygon,
Bitmap2D bitmap,
const double  extend_dist = 0.0,
const bool  no_edge_table = false 
)

在文件 polygon_mask.h43 行定义.

45 {
46 typedef typename PolygonScanCvter<T>::IntervalIn IntervalIn;
47 typedef typename PolygonScanCvter<T>::IntervalOut IntervalOut;
48 typedef typename PolygonScanCvter<T>::DirectionMajor PolyDirMajor;
49 if (bitmap->Empty()) {
50 AERROR << "bitmap is empty";
51 return false;
52 }
53 Eigen::Vector2d poly_min_p, poly_max_p;
54 poly_min_p.setConstant(std::numeric_limits<double>::max());
55 poly_max_p = -poly_min_p;
56 for (const auto& pt : polygon) {
57 poly_min_p.x() = std::min(pt.x(), poly_min_p.x());
58 poly_min_p.y() = std::min(pt.y(), poly_min_p.y());
59
60 poly_max_p.x() = std::max(pt.x(), poly_max_p.x());
61 poly_max_p.y() = std::max(pt.y(), poly_max_p.y());
62 }
63 if (poly_max_p.x() <= poly_min_p.x()) {
64 AERROR << "Invalid polygon";
65 return false;
66 }
67 if (poly_max_p.y() <= poly_min_p.y()) {
68 AERROR << "Invalid polygon";
69 return false;
70 }
71 const Eigen::Vector2d& bitmap_min_range = bitmap->min_range();
72 const Eigen::Vector2d& bitmap_max_range = bitmap->max_range();
73 const Eigen::Vector2d& cell_size = bitmap->cell_size();
74 const int major_dir = bitmap->dir_major();
75 const int op_major_dir = bitmap->op_dir_major();
76
77 // check major x range
78 IntervalIn valid_range;
79 valid_range.first =
80 std::max(poly_min_p[major_dir], bitmap_min_range[major_dir]);
81 valid_range.second =
82 std::min(poly_max_p[major_dir], bitmap_max_range[major_dir]);
83
84 // for numerical stability
85 valid_range.first =
86 (static_cast<int>((valid_range.first - bitmap_min_range[major_dir]) /
87 cell_size[major_dir]) +
88 0.5) *
89 cell_size[major_dir] +
90 bitmap_min_range[major_dir];
91
92 if (valid_range.second < valid_range.first + cell_size[major_dir]) {
93 AWARN << "Invalid range: " << valid_range.first << " " << valid_range.second
94 << ". polygon major directory range: " << poly_min_p[major_dir] << " "
95 << poly_max_p[major_dir] << ". cell size: " << cell_size[major_dir];
96 return true;
97 }
98
99 // start calculating intervals of scans
100 PolygonScanCvter<T> poly_scan_cvter;
101 poly_scan_cvter.Init(polygon);
102 std::vector<std::vector<IntervalOut>> scans_intervals;
103 if (no_edge_table) {
104 size_t scans_size = static_cast<size_t>(
105 (valid_range.second - valid_range.first) / cell_size[major_dir]);
106 scans_intervals.resize(scans_size);
107 for (size_t i = 0; i < scans_size; ++i) {
108 double scan_loc = valid_range.first + i * cell_size[major_dir];
109 poly_scan_cvter.ScanCvt(scan_loc, static_cast<PolyDirMajor>(major_dir),
110 &(scans_intervals[i]));
111 }
112 } else {
113 poly_scan_cvter.ScansCvt(valid_range, static_cast<PolyDirMajor>(major_dir),
114 cell_size[major_dir], &(scans_intervals));
115 }
116 // start to draw
117 double x = valid_range.first;
118 for (size_t i = 0; i < scans_intervals.size();
119 x += cell_size[major_dir], ++i) {
120 for (auto scan_interval : scans_intervals[i]) {
121 if (scan_interval.first > scan_interval.second) {
122 AERROR << "The input polygon is illegal(complex polygon)";
123 return false;
124 }
125
126 // extend
127 scan_interval.first -= extend_dist;
128 scan_interval.second += extend_dist;
129
130 IntervalOut valid_y_range;
131 valid_y_range.first =
132 std::max(bitmap_min_range[op_major_dir], scan_interval.first);
133 valid_y_range.second =
134 std::min(bitmap_max_range[op_major_dir], scan_interval.second);
135 if (valid_y_range.first > valid_y_range.second) {
136 continue;
137 }
138 bitmap->Set(x, valid_y_range.first, valid_y_range.second);
139 }
140 }
141 return true;
142}
const Eigen::Vector2d & max_range() const
Return the max_range_
Definition bitmap2d.h:68
void Set(const Eigen::Vector2d &p)
Set the vector p
Definition bitmap2d.cc:128
int dir_major() const
Return the dir_major_
Definition bitmap2d.h:103
const Eigen::Vector2d & min_range() const
Return the min_range_
Definition bitmap2d.h:61
int op_dir_major() const
Return the op_dir_major
Definition bitmap2d.h:110
bool Empty() const
cehck the bitmap_ is emtpy
Definition bitmap2d.h:136
const Eigen::Vector2d & cell_size() const
Return the cell_size_
Definition bitmap2d.h:75
#define AERROR
Definition log.h:44
#define AWARN
Definition log.h:43

◆ DrawPolygonsMask()

template<typename T >
bool apollo::perception::lidar::DrawPolygonsMask ( const std::vector< typename PolygonScanCvter< T >::Polygon > &  polygons,
Bitmap2D bitmap,
const double  extend_dist = 0.0,
const bool  no_edge_table = false 
)

在文件 polygon_mask.h145 行定义.

147 {
148 for (const auto& polygon : polygons) {
149 bool flag = DrawPolygonMask<T>(polygon, bitmap, extend_dist, no_edge_table);
150 if (!flag) {
151 return false;
152 }
153 }
154 return true;
155}

◆ EuclideanDistance()

float apollo::perception::lidar::EuclideanDistance ( const TrackedObjectConstPtr last_object,
const Eigen::VectorXf &  track_predict,
const TrackedObjectConstPtr new_object,
const double  time_diff 
)

: compute euclidean distance for given track & object

参数
last_objectobject for computing distance
track_predictpredicted state of track for computing distance
new_objectnew detected object for computing distance
time_difftime interval from last matching
返回
: euclidean distance

在文件 distance_collection.cc31 行定义.

34 {
35 Eigen::Vector3f measured_anchor = (new_object->barycenter).cast<float>();
36 Eigen::Vector3f predicted_anchor = track_predict.head(3);
37 Eigen::Vector3f measured_diff = measured_anchor - predicted_anchor;
38
39 float location_dist = measured_diff.head(2).norm();
40 return location_dist;
41}

◆ F2I()

int apollo::perception::lidar::F2I ( float  val,
float  ori,
float  scale 
)
inline

在文件 util.h33 行定义.

33 {
34 return static_cast<int>(std::floor((ori - val) * scale));
35}

◆ FilterPointsOutsideRange()

template<typename PointT >
void apollo::perception::lidar::FilterPointsOutsideRange ( const typename pcl::PointCloud< PointT >::Ptr &  input_cloud_ptr,
const std::string &  filter_axis,
const double &  limit_min,
const double &  limit_max,
typename pcl::PointCloud< PointT >::Ptr  output_cloud_ptr 
)

在文件 pointcloud_util.h57 行定义.

61 {
62 pcl::PassThrough<PointT> pass;
63 pass.setInputCloud(input_cloud_ptr);
64 pass.setFilterFieldName(filter_axis);
65 pass.setFilterLimits(limit_min, limit_max);
66 pass.filter(*output_cloud_ptr);
67}

◆ get_3dbox_iou()

float apollo::perception::lidar::get_3dbox_iou ( base::ObjectPtr  obj1,
base::ObjectPtr  obj2 
)

在文件 center_point_detection.cc150 行定义.

150 {
151 auto center1 = obj1->center;
152 auto center2 = obj2->center;
153 auto size1 = obj1->size;
154 auto size2 = obj2->size;
155 float x_len = get_3Dbox_iou_len(center1(0), size1(0), center2(0), size2(0));
156 float y_len = get_3Dbox_iou_len(center1(1), size1(1), center2(1), size2(1));
157 float z_len = get_3Dbox_iou_len(center1(2), size1(2), center2(2), size2(2));
158 float v1 = size1(0) * size1(1) * size1(2);
159 float v2 = size2(0) * size2(1) * size2(2);
160 float vo = x_len * y_len * z_len;
161 return vo / (v1 + v2 - vo);
162}
float get_3Dbox_iou_len(float center1, float len1, float center2, float len2)

◆ get_3Dbox_iou_len()

float apollo::perception::lidar::get_3Dbox_iou_len ( float  center1,
float  len1,
float  center2,
float  len2 
)

在文件 center_point_detection.cc139 行定义.

139 {
140 float x11 = center1 - len1 / 2;
141 float x12 = center2 - len2 / 2;
142 float x21 = center1 + len1 / 2;
143 float x22 = center2 + len2 / 2;
144 if (std::min(x22, x21) - std::max(x12, x11) < 0) {
145 return 0;
146 }
147 return std::min(x22, x21) - std::max(x12, x11);
148}

◆ GetBoundingBox2d() [1/2]

void apollo::perception::lidar::GetBoundingBox2d ( const std::shared_ptr< base::Object > &  object,
base::PointCloud< base::PointD > *  box,
double  expand = 0.0 
)

Get the Bounding Box vertices and save in polygon type

参数
object
boxbounding box vertices(4 in xy plane)
expandexpand valud, in meter

◆ GetBoundingBox2d() [2/2]

void apollo::perception::lidar::GetBoundingBox2d ( const std::shared_ptr< Object > &  object,
PointCloud< PointD > *  box,
double  expand 
)

在文件 lidar_object_util.cc35 行定义.

36 {
37 box->clear();
38 box->resize(4);
39
40 Eigen::Vector3d direction = object->direction.cast<double>();
41 Eigen::Vector3d odirection(-direction(1), direction(0), 0.0);
42 double half_length = object->size(0) * 0.5 + expand;
43 double half_width = object->size(1) * 0.5 + expand;
44
45 box->at(0).x = half_length * direction(0) + half_width * odirection(0) +
46 object->center(0);
47 box->at(0).y = half_length * direction(1) + half_width * odirection(1) +
48 object->center(1);
49 box->at(1).x = -half_length * direction(0) + half_width * odirection(0) +
50 object->center(0);
51 box->at(1).y = -half_length * direction(1) + half_width * odirection(1) +
52 object->center(1);
53 box->at(2).x = -half_length * direction(0) - half_width * odirection(0) +
54 object->center(0);
55 box->at(2).y = -half_length * direction(1) - half_width * odirection(1) +
56 object->center(1);
57 box->at(3).x = half_length * direction(0) - half_width * odirection(0) +
58 object->center(0);
59 box->at(3).y = half_length * direction(1) - half_width * odirection(1) +
60 object->center(1);
61}
const PointT * at(size_t col, size_t row) const
Definition point_cloud.h:63
virtual void resize(size_t size)
Definition point_cloud.h:88

◆ GetIndex()

uint32_t apollo::perception::lidar::GetIndex ( uint32_t  r,
uint32_t  c,
uint32_t  cols 
)
inline

在文件 ground_service.cc69 行定义.

69 {
70 return (r * cols + c);
71}

◆ GetMotionLabel()

PointMotionLabel apollo::perception::lidar::GetMotionLabel ( uint8_t  value)
inline

在文件 lidar_point_label.h70 行定义.

70 {
71 return static_cast<PointMotionLabel>(value >> 4);
72}

◆ GetSemanticLabel()

PointSemanticLabel apollo::perception::lidar::GetSemanticLabel ( uint8_t  value)
inline

在文件 lidar_point_label.h56 行定义.

56 {
57 return static_cast<PointSemanticLabel>(value & 15);
58}

◆ GPUAssert()

void apollo::perception::lidar::GPUAssert ( cudaError_t  code,
const char *  file,
int  line,
bool  abort = true 
)
inline

在文件 common.h80 行定义.

81 {
82 if (code != cudaSuccess) {
83 fprintf(stderr, "GPUassert: %s %s %d\n", cudaGetErrorString(code), file,
84 line);
85 if (abort) exit(code);
86 }
87}

◆ GroupPc2Pixel()

void apollo::perception::lidar::GroupPc2Pixel ( float  pc_x,
float  pc_y,
float  scale,
float  range,
int *  x,
int *  y 
)
inline

在文件 util.h38 行定义.

39 {
40 float fx = (range - (0.707107f * (pc_x + pc_y))) * scale;
41 float fy = (range - (0.707107f * (pc_x - pc_y))) * scale;
42 *x = fx < 0 ? -1 : static_cast<int>(fx);
43 *y = fy < 0 ? -1 : static_cast<int>(fy);
44}

◆ HistogramDistance()

float apollo::perception::lidar::HistogramDistance ( const TrackedObjectConstPtr last_object,
const Eigen::VectorXf &  track_predict,
const TrackedObjectConstPtr new_object,
const double  time_diff 
)

Compute histogram distance for given track & object

参数
last_objectobject for computing distance
track_predictpredicted state of track for computing distance
new_objectnew detected object for computing distance
time_difftime interval from last matching
返回
float distance

在文件 distance_collection.cc166 行定义.

169 {
170 // Compute histogram distance for last object and new object
171 // range from 0 to 3
172
173 const std::vector<float>& old_object_shape_features =
174 last_object->shape_features;
175 const std::vector<float>& new_object_shape_features =
176 new_object->shape_features;
177
178 if (old_object_shape_features.size() != new_object_shape_features.size()) {
179 AINFO << "sizes of compared features not matched. TrackObjectDistance";
180 return 100;
181 }
182
183 float histogram_dist = 0.0f;
184 for (size_t i = 0; i < old_object_shape_features.size(); ++i) {
185 histogram_dist +=
186 std::fabs(old_object_shape_features[i] - new_object_shape_features[i]);
187 }
188
189 return histogram_dist;
190}

◆ IsMotionLabelEqual()

bool apollo::perception::lidar::IsMotionLabelEqual ( PointMotionLabel  label,
uint8_t  value 
)
inline

在文件 lidar_point_label.h74 行定义.

74 {
75 return (value >> 4) == static_cast<uint8_t>(label);
76}

◆ IsSemanticLabelEqual()

bool apollo::perception::lidar::IsSemanticLabelEqual ( PointSemanticLabel  label,
uint8_t  value 
)
inline

在文件 lidar_point_label.h60 行定义.

60 {
61 return (value & 15) == static_cast<uint8_t>(label);
62}

◆ JudgeBlindTrafficCone()

bool apollo::perception::lidar::JudgeBlindTrafficCone ( const MlfTrackDataConstPtr track_data,
double  frame_timestamp,
const Eigen::Vector3d &  local_to_global_offset,
Eigen::Affine3d &  lidar2world_pose,
Eigen::Affine3d &  lidar2novatel_pose 
)

在文件 util.cc24 行定义.

26 {
27 TrackedObjectConstPtr latest_object = track_data->GetLatestObject().second;
28 if (!FLAGS_need_reserve_blind_cone || latest_object == nullptr) {
29 return false;
30 }
31 // reserve condition: TrafficCone
32 // reserve condition: static
33 // reserve condition: within reserve time
34 double time_diff = frame_timestamp - track_data->GetLatestObject().first;
35 if (latest_object->output_velocity.head<2>().norm() > 0.01 ||
36 latest_object->object_ptr->sub_type != base::ObjectSubType::TRAFFICCONE
37 || time_diff >= FLAGS_cone_reserve_time) {
38 return false;
39 }
40
41 // reserve condition: front
42 Eigen::Vector3d world_center = Eigen::Vector3d(
43 latest_object->center(0) + local_to_global_offset(0),
44 latest_object->center(1) + local_to_global_offset(1),
45 latest_object->center(2) + local_to_global_offset(2));
46
47 // from world to lidar to imu
48 Eigen::Vector3d lidar_center = Eigen::Vector3d(1, 0, 0);
49 lidar_center = lidar2world_pose.inverse() * world_center;
50
51 Eigen::Vector3d imu_center = Eigen::Vector3d(1, 0, 0);
52 imu_center = lidar2novatel_pose * lidar_center;
53
54 if (imu_center(0) <= FLAGS_cone_x_front &&
55 imu_center(0) >= FLAGS_cone_x_back &&
56 imu_center(1) <= FLAGS_cone_y_front &&
57 imu_center(1) >= FLAGS_cone_y_back) {
58 AINFO << "[JudgeBlindTrafficCone] track_id: " << track_data->track_id_
59 << " loc: (x) " << imu_center(0) << " (y) " << imu_center(1)
60 << " reserve. time_diff: " << time_diff;
61 return true;
62 }
63 return false;
64}
std::shared_ptr< const TrackedObject > TrackedObjectConstPtr

◆ LoadPCLPCD()

bool apollo::perception::lidar::LoadPCLPCD ( const std::string &  file_path,
base::PointFCloud cloud_out 
)
inline

在文件 pcl_util.h54 行定义.

55 {
56 pcl::PointCloud<PCLPointXYZIT> org_cloud;
57 if (pcl::io::loadPCDFile(file_path, org_cloud) < 0) {
58 AERROR << "Failed to load pcd file " << file_path;
59 return false;
60 }
61 cloud_out->resize(org_cloud.size());
62 for (size_t i = 0; i < org_cloud.size(); ++i) {
63 auto& pt = org_cloud.points[i];
64 auto& new_pt = cloud_out->at(i);
65 new_pt.x = pt.x;
66 new_pt.y = pt.y;
67 new_pt.z = pt.z;
68 new_pt.intensity = pt.intensity;
69 cloud_out->mutable_points_timestamp()->at(i) = pt.timestamp;
70 }
71 return true;
72}
void resize(const size_t size) override
std::vector< double > * mutable_points_timestamp()

◆ LoadPointCloud()

template<typename PointT >
void apollo::perception::lidar::LoadPointCloud ( const std::string &  filename,
typename pcl::PointCloud< PointT >::Ptr  point_cloud 
)

在文件 pointcloud_util.h70 行定义.

71 {
72 typename pcl::PointCloud<PointT>::Ptr cloud(new pcl::PointCloud<PointT>);
73 if (pcl::io::loadPCDFile<PointT>(filename, *point_cloud) == -1) {
74 throw std::runtime_error("Couldn't read file " + filename);
75 }
76 std::cout << "Loaded " << point_cloud->width * point_cloud->height
77 << " data points from " << filename << std::endl;
78}

◆ LocationDistance()

float apollo::perception::lidar::LocationDistance ( const TrackedObjectConstPtr last_object,
const Eigen::VectorXf &  track_predict,
const TrackedObjectConstPtr new_object,
const double  time_diff 
)

Compute location distance for given track & object

参数
last_objectobject for computing distance
track_predictpredicted state of track for computing distance
new_objectnew detected object for computing distance
time_difftime interval from last matching
返回
float distance

在文件 distance_collection.cc43 行定义.

46 {
47 // Compute locatin distance for last object and new object
48 // range from 0 to positive infinity
49
50 Eigen::Vector3f measured_anchor_point =
51 (new_object->anchor_point).cast<float>();
52 Eigen::Vector3f predicted_anchor_point = track_predict.head(3);
53 Eigen::Vector3f measure_predict_diff =
54 measured_anchor_point - predicted_anchor_point;
55
56 float location_dist = static_cast<float>(sqrt(
57 (measure_predict_diff.head(2).cwiseProduct(measure_predict_diff.head(2)))
58 .sum()));
59
60 /* NEED TO NOTICE: All the states would be collected mainly based on
61 * states of tracked objects. Thus, update tracked object when you
62 * update the state of track !!!!! */
63 Eigen::Vector2d ref_dir = last_object->output_velocity.head(2);
64 double speed = ref_dir.norm();
65 ref_dir /= speed;
66
67 /* Let location distance generated from a normal distribution with
68 * symmetric variance. Modify its variance when speed greater than
69 * a threshold. Penalize variance other than motion direction. */
70 if (speed > 2) {
71 Eigen::Vector2d ref_o_dir = Eigen::Vector2d(ref_dir[1], -ref_dir[0]);
72 double dx = ref_dir(0) * measure_predict_diff(0) +
73 ref_dir(1) * measure_predict_diff(1);
74 double dy = ref_o_dir(0) * measure_predict_diff(0) +
75 ref_o_dir(1) * measure_predict_diff(1);
76 location_dist = static_cast<float>(sqrt(dx * dx * 0.5 + dy * dy * 2));
77 }
78
79 return location_dist;
80}

◆ MeasureAnchorPointVelocity()

void apollo::perception::lidar::MeasureAnchorPointVelocity ( TrackedObjectPtr  new_object,
const TrackedObjectConstPtr old_object,
const double &  time_diff 
)

Measure anchor point velocity

参数
new_objectfor current updating
old_objectfor last updating
time_difftime interval from last updating

在文件 measurement_collection.cc28 行定义.

30 {
31 // Compute 2D anchor point velocity measurement
32 Eigen::Vector3d measured_anchor_point_velocity =
33 new_object->anchor_point - old_object->belief_anchor_point;
34 measured_anchor_point_velocity /= time_diff;
35 measured_anchor_point_velocity(2) = 0.0;
36 new_object->measured_barycenter_velocity = measured_anchor_point_velocity;
37}

◆ MeasureBboxCenterHistoryVelocity()

void apollo::perception::lidar::MeasureBboxCenterHistoryVelocity ( const MlfTrackDataConstPtr track_data,
TrackedObjectPtr  new_object 
)

在文件 measurement_collection.cc69 行定义.

70 {
71 const int history_size = 10;
72 auto history_objs = track_data->GetHistoryObjects();
73 if (history_objs.empty() || history_objs.size() == 1) {
74 new_object->measured_history_center_velocity = Eigen::Vector3d::Zero();
75 return;
76 }
77 if (history_objs.size() <= history_size) {
78 auto new_obj = history_objs.rbegin();
79 auto old_obj = history_objs.cbegin();
80 double time_diff = new_obj->first - old_obj->first;
81 if (time_diff < std::numeric_limits<double>::epsilon()) {
82 return;
83 }
84 if (new_obj->second == nullptr || old_obj->second == nullptr) {
85 return;
86 }
87 new_object->measured_history_center_velocity =
88 (new_obj->second->center - old_obj->second->center) / time_diff;
89 return;
90 }
91 auto new_obj = history_objs.rbegin();
92 auto old_obj = track_data->GetHistoryObject(1 - history_size);
93 double time_diff = new_obj->first - old_obj.first;
94 if (time_diff < std::numeric_limits<double>::epsilon()) {
95 return;
96 }
97 if (new_obj->second == nullptr || old_obj.second == nullptr) {
98 return;
99 }
100 new_object->measured_history_center_velocity =
101 (new_obj->second->center - old_obj.second->center) / time_diff;
102}

◆ MeasureBboxCenterVelocity()

void apollo::perception::lidar::MeasureBboxCenterVelocity ( TrackedObjectPtr  new_object,
const TrackedObjectConstPtr old_object,
const double &  time_diff 
)

Measure bbox center velocity

参数
new_objectfor current updating
old_objectfor last updating
time_difftime interval from last updating

在文件 measurement_collection.cc39 行定义.

41 {
42 // Compute 2D bbox center velocity measurement
43 Eigen::Vector3f old_dir_tmp = old_object->output_direction.cast<float>();
44 // Eigen::Vector3d old_size = old_object->output_size;
45 Eigen::Vector3d old_center = old_object->output_center;
46 Eigen::Vector3f new_size_tmp;
47 Eigen::Vector3d new_center;
48 float minimum_edge_length = 0.01f;
49 base::PointDCloud& cloud =
50 (new_object->object_ptr->lidar_supplement).cloud_world;
51 algorithm::CalculateBBoxSizeCenter2DXY(cloud, old_dir_tmp, &new_size_tmp,
52 &new_center, minimum_edge_length);
53 // Eigen::Vector3d old_dir = old_dir_tmp.cast<double>();
54 // Eigen::Vector3d new_size = new_size_tmp.cast<double>();
55 Eigen::Vector3d measured_bbox_center_velocity_with_old_dir =
56 (new_center - old_center);
57 measured_bbox_center_velocity_with_old_dir /= time_diff;
58 measured_bbox_center_velocity_with_old_dir(2) = 0.0;
59 Eigen::Vector3d measured_bbox_center_velocity =
60 measured_bbox_center_velocity_with_old_dir;
61 Eigen::Vector3d project_dir =
62 new_object->anchor_point - old_object->belief_anchor_point;
63 if (measured_bbox_center_velocity.dot(project_dir) <= 0) {
64 measured_bbox_center_velocity = Eigen::Vector3d::Zero();
65 }
66 new_object->measured_center_velocity = measured_bbox_center_velocity;
67}

◆ MeasureBboxCornerHistoryVelocity()

void apollo::perception::lidar::MeasureBboxCornerHistoryVelocity ( const MlfTrackDataConstPtr track_data,
TrackedObjectPtr  new_object 
)

在文件 measurement_collection.cc199 行定义.

200 {
201 const int history_size = 10;
202 auto history_objs = track_data->GetHistoryObjects();
203 if (history_objs.empty() || history_objs.size() == 1) {
204 for (size_t i = 0; i < 4; ++i) {
205 new_object->measured_history_corners_velocity[i] =
206 Eigen::Vector3d::Zero();
207 }
208 return;
209 }
210 if (history_objs.size() <= history_size) {
211 auto new_obj = history_objs.rbegin();
212 auto old_obj = history_objs.cbegin();
213 double time_diff = new_obj->first - old_obj->first;
214 if (time_diff < std::numeric_limits<double>::epsilon()) {
215 return;
216 }
217 if (new_obj->second == nullptr || old_obj->second == nullptr) {
218 return;
219 }
221 new_obj->second, old_obj->second, time_diff, new_object);
222 return;
223 }
224 auto new_obj = history_objs.rbegin();
225 auto old_obj = track_data->GetHistoryObject(1 - history_size);
226 double time_diff = new_obj->first - old_obj.first;
227 if (time_diff < std::numeric_limits<double>::epsilon()) {
228 return;
229 }
230 if (new_obj->second == nullptr || old_obj.second == nullptr) {
231 return;
232 }
234 new_obj->second, old_obj.second, time_diff, new_object);
235}
void ComputeBboxCornerHistoryVelocity(TrackedObjectPtr new_object, const TrackedObjectConstPtr &old_object, const double &time_diff, TrackedObjectPtr curr_object)

◆ MeasureBboxCornerVelocity()

void apollo::perception::lidar::MeasureBboxCornerVelocity ( TrackedObjectPtr  new_object,
const TrackedObjectConstPtr old_object,
const double &  time_diff 
)

Measure bbox corner velocity

参数
new_objectfor current updating
old_objectfor last updating
time_difftime interval from last updating

在文件 measurement_collection.cc104 行定义.

106 {
107 // Compute 2D bbxo corner velocity measurement
108 Eigen::Vector3f old_dir_tmp = old_object->output_direction.cast<float>();
109 Eigen::Vector3d old_size = old_object->output_size;
110 Eigen::Vector3d old_center = old_object->output_center;
111 Eigen::Vector3f new_size_tmp;
112 Eigen::Vector3d new_center;
113 float minimum_edge_length = 0.01f;
114 base::PointDCloud& cloud =
115 (new_object->object_ptr->lidar_supplement).cloud_world;
116 algorithm::CalculateBBoxSizeCenter2DXY(cloud, old_dir_tmp, &new_size_tmp,
117 &new_center, minimum_edge_length);
118 Eigen::Vector3d old_dir = old_dir_tmp.cast<double>();
119 Eigen::Vector3d new_size = new_size_tmp.cast<double>();
120 Eigen::Vector3d ortho_old_dir(-old_dir(1), old_dir(0), 0.0);
121 Eigen::Vector3d old_bbox_corner_list[4];
122 Eigen::Vector3d new_bbox_corner_list[4];
123 Eigen::Vector3d old_bbox_corner = old_center + old_dir * old_size(0) * 0.5 +
124 ortho_old_dir * old_size(1) * 0.5;
125 Eigen::Vector3d new_bbox_corner = new_center + old_dir * new_size(0) * 0.5 +
126 ortho_old_dir * new_size(1) * 0.5;
127 old_bbox_corner_list[0] = old_bbox_corner;
128 new_bbox_corner_list[0] = new_bbox_corner;
129 old_bbox_corner = old_center - old_dir * old_size(0) * 0.5 +
130 ortho_old_dir * old_size(1) * 0.5;
131 new_bbox_corner = new_center - old_dir * new_size(0) * 0.5 +
132 ortho_old_dir * new_size(1) * 0.5;
133 old_bbox_corner_list[1] = old_bbox_corner;
134 new_bbox_corner_list[1] = new_bbox_corner;
135 old_bbox_corner = old_center + old_dir * old_size(0) * 0.5 -
136 ortho_old_dir * old_size(1) * 0.5;
137 new_bbox_corner = new_center + old_dir * new_size(0) * 0.5 -
138 ortho_old_dir * new_size(1) * 0.5;
139 old_bbox_corner_list[2] = old_bbox_corner;
140 new_bbox_corner_list[2] = new_bbox_corner;
141 old_bbox_corner = old_center - old_dir * old_size(0) * 0.5 -
142 ortho_old_dir * old_size(1) * 0.5;
143 new_bbox_corner = new_center - old_dir * new_size(0) * 0.5 -
144 ortho_old_dir * new_size(1) * 0.5;
145 old_bbox_corner_list[3] = old_bbox_corner;
146 new_bbox_corner_list[3] = new_bbox_corner;
147
148 // calculate the nearest corner
149 Eigen::Vector3d ref_location = new_object->sensor_to_local_pose.translation();
150 Eigen::Vector3d nearest_old_bbox_corner = old_bbox_corner_list[0];
151 Eigen::Vector3d nearest_new_bbox_corner = new_bbox_corner_list[0];
152 double min_center_distance = (ref_location - nearest_new_bbox_corner).norm();
153 for (size_t i = 1; i < 4; ++i) {
154 double center_distance = (ref_location - new_bbox_corner_list[i]).norm();
155 if (center_distance < min_center_distance) {
156 min_center_distance = center_distance;
157 nearest_old_bbox_corner = old_bbox_corner_list[i];
158 nearest_new_bbox_corner = new_bbox_corner_list[i];
159 }
160 }
161 // no projection
162 new_object->measured_nearest_corner_velocity =
163 (nearest_new_bbox_corner - nearest_old_bbox_corner) / time_diff;
164
165 // select project_dir by change of size
166 Eigen::Vector3d direct_old_size = old_object->size;
167 Eigen::Vector3d direct_new_size = new_object->size;
168 double length_change =
169 fabs(direct_old_size(0) - direct_new_size(0)) / direct_old_size(0);
170 double width_change =
171 fabs(direct_old_size(1) - direct_new_size(1)) / direct_old_size(1);
172
173 const double max_change_thresh = 0.1;
174 Eigen::Vector3d project_dir;
175 if (length_change < max_change_thresh && width_change < max_change_thresh) {
176 project_dir = new_object->center - old_object->center;
177 } else {
178 project_dir = new_object->anchor_point - old_object->belief_anchor_point;
179 }
180
181 for (size_t i = 0; i < 4; ++i) {
182 old_bbox_corner = old_bbox_corner_list[i];
183 new_bbox_corner = new_bbox_corner_list[i];
184 new_object->corners[i] = new_bbox_corner_list[i];
185 Eigen::Vector3d bbox_corner_velocity =
186 ((new_bbox_corner - old_bbox_corner) / time_diff);
187 Eigen::Vector3d bbox_corner_velocity_on_project_dir =
188 algorithm::Calculate2DXYProjectVector<double>(bbox_corner_velocity,
189 project_dir);
190 // set velocity as 0 when conflict
191 if (bbox_corner_velocity_on_project_dir.dot(project_dir) <= 0) {
192 bbox_corner_velocity_on_project_dir = Eigen::Vector3d::Zero();
193 }
194 new_object->measured_corners_velocity[i] =
195 bbox_corner_velocity_on_project_dir;
196 }
197}

◆ MeasureObjectDetectionHistoryVelocity()

void apollo::perception::lidar::MeasureObjectDetectionHistoryVelocity ( const MlfTrackDataConstPtr track_data,
TrackedObjectPtr  new_object 
)

在文件 measurement_collection.cc322 行定义.

323 {
324 const int history_size = 10;
325 auto history_objs = track_data->GetHistoryObjects();
326 if (history_objs.empty() || history_objs.size() == 1) {
327 for (size_t i = 0; i < 4; i++) {
328 new_object->measured_detection_history_corners_velocity[i] =
329 Eigen::Vector3d::Zero();
330 }
331 new_object->measured_detection_history_center_velocity =
332 Eigen::Vector3d::Zero();
333 return;
334 }
335 if (history_objs.size() <= history_size) {
336 auto new_obj = history_objs.rbegin();
337 auto old_obj = history_objs.cbegin();
338 double time_diff = new_obj->first - old_obj->first;
339 if (time_diff < std::numeric_limits<double>::epsilon()) {
340 return;
341 }
342 if (new_obj->second == nullptr || old_obj->second == nullptr) {
343 return;
344 }
345 Eigen::Vector3d center_diff = new_obj->second->detection_center
346 - old_obj->second->detection_center;
347 new_object->measured_detection_history_center_velocity =
348 center_diff / time_diff;
349 for (size_t i = 0; i < 4; i++) {
350 Eigen::Vector3d corner_diff = new_obj->second->detection_corners[i]
351 - old_obj->second->detection_corners[i];
352 new_object->measured_detection_history_corners_velocity[i] =
353 corner_diff / time_diff;
354 }
355 return;
356 }
357 auto new_obj = history_objs.rbegin();
358 auto old_obj = track_data->GetHistoryObject(1 - history_size);
359 double time_diff = new_obj->first - old_obj.first;
360 if (time_diff < std::numeric_limits<double>::epsilon()) {
361 return;
362 }
363 if (new_obj->second == nullptr || old_obj.second == nullptr) {
364 return;
365 }
366 Eigen::Vector3d center_diff =
367 new_obj->second->detection_center - old_obj.second->detection_center;
368 new_object->measured_detection_history_center_velocity =
369 center_diff / time_diff;
370 for (size_t i = 0; i < 4; i++) {
371 Eigen::Vector3d cor_diff = new_obj->second->detection_corners[i]
372 - old_obj.second->detection_corners[i];
373 new_object->measured_detection_history_corners_velocity[i] =
374 cor_diff / time_diff;
375 }
376}

◆ MeasureObjectDetectionVelocity()

void apollo::perception::lidar::MeasureObjectDetectionVelocity ( TrackedObjectPtr  new_object,
const TrackedObjectConstPtr old_object,
const double &  time_diff 
)

Measure object-detection center and corner velocity

参数
new_objectfor current updating
old_objectfor last updating
time_difftime interval from last updating

在文件 measurement_collection.cc313 行定义.

314 {
315 Eigen::Vector3d mea_single_model_velocity =
316 new_object->detection_center - old_object->detection_center;
317 mea_single_model_velocity /= time_diff;
318 mea_single_model_velocity(2) = 0.0;
319 new_object->measured_detection_center_velocity = mea_single_model_velocity;
320}

◆ operator<()

bool apollo::perception::lidar::operator< ( const MatchCost m1,
const MatchCost m2 
)

在文件 gnn_bipartite_graph_matcher.cc37 行定义.

37 {
38 return m1.cost_ < m2.cost_;
39}

◆ operator<<()

std::ostream & apollo::perception::lidar::operator<< ( std::ostream &  os,
const MatchCost m 
)

在文件 gnn_bipartite_graph_matcher.cc41 行定义.

41 {
42 os << "MatchCost ridx:" << m.RowIdx() << " cidx:" << m.ColIdx()
43 << " Cost:" << m.Cost();
44 return os;
45}

◆ Pc2Pixel()

int apollo::perception::lidar::Pc2Pixel ( float  in_pc,
float  in_range,
float  out_size 
)
inline

在文件 util.h47 行定义.

47 {
48 float inv_res = 0.5f * out_size / in_range;
49 return static_cast<int>(std::floor((in_range - in_pc) * inv_res));
50}

◆ PERCEPTION_REGISTER_BIPARTITEGRAPHMATCHER() [1/2]

apollo::perception::lidar::PERCEPTION_REGISTER_BIPARTITEGRAPHMATCHER ( GnnBipartiteGraphMatcher  )

◆ PERCEPTION_REGISTER_BIPARTITEGRAPHMATCHER() [2/2]

apollo::perception::lidar::PERCEPTION_REGISTER_BIPARTITEGRAPHMATCHER ( MultiHmBipartiteGraphMatcher  )

◆ PERCEPTION_REGISTER_CLASSIFIER()

apollo::perception::lidar::PERCEPTION_REGISTER_CLASSIFIER ( FusedClassifier  )

◆ PERCEPTION_REGISTER_GROUNDDETECTOR() [1/2]

apollo::perception::lidar::PERCEPTION_REGISTER_GROUNDDETECTOR ( GroundServiceDetector  )

◆ PERCEPTION_REGISTER_GROUNDDETECTOR() [2/2]

apollo::perception::lidar::PERCEPTION_REGISTER_GROUNDDETECTOR ( SpatioTemporalGroundDetector  )

◆ PERCEPTION_REGISTER_LIDARDETECTOR() [1/4]

apollo::perception::lidar::PERCEPTION_REGISTER_LIDARDETECTOR ( CenterPointDetection  )

◆ PERCEPTION_REGISTER_LIDARDETECTOR() [2/4]

apollo::perception::lidar::PERCEPTION_REGISTER_LIDARDETECTOR ( CNNSegmentation  )

◆ PERCEPTION_REGISTER_LIDARDETECTOR() [3/4]

apollo::perception::lidar::PERCEPTION_REGISTER_LIDARDETECTOR ( MaskPillarsDetection  )

◆ PERCEPTION_REGISTER_LIDARDETECTOR() [4/4]

apollo::perception::lidar::PERCEPTION_REGISTER_LIDARDETECTOR ( PointPillarsDetection  )

◆ PERCEPTION_REGISTER_MLFFILTER() [1/3]

apollo::perception::lidar::PERCEPTION_REGISTER_MLFFILTER ( MlfMotionFilter  )

◆ PERCEPTION_REGISTER_MLFFILTER() [2/3]

apollo::perception::lidar::PERCEPTION_REGISTER_MLFFILTER ( MlfShapeFilter  )

◆ PERCEPTION_REGISTER_MLFFILTER() [3/3]

apollo::perception::lidar::PERCEPTION_REGISTER_MLFFILTER ( MlfTypeFilter  )

◆ PERCEPTION_REGISTER_MULTITARGET_TRACKER()

apollo::perception::lidar::PERCEPTION_REGISTER_MULTITARGET_TRACKER ( MlfEngine  )

◆ PERCEPTION_REGISTER_ONESHOTTYPEFUSION() [1/2]

apollo::perception::lidar::PERCEPTION_REGISTER_ONESHOTTYPEFUSION ( CCRFOneShotTypeFusion  )

◆ PERCEPTION_REGISTER_ONESHOTTYPEFUSION() [2/2]

apollo::perception::lidar::PERCEPTION_REGISTER_ONESHOTTYPEFUSION ( CCRFSingleShotTypeFusion  )

◆ PERCEPTION_REGISTER_POINTCLOUDPREPROCESSOR()

apollo::perception::lidar::PERCEPTION_REGISTER_POINTCLOUDPREPROCESSOR ( PointCloudPreprocessor  )

◆ PERCEPTION_REGISTER_REGISTERER() [1/13]

apollo::perception::lidar::PERCEPTION_REGISTER_REGISTERER ( BaseBipartiteGraphMatcher  )

◆ PERCEPTION_REGISTER_REGISTERER() [2/13]

apollo::perception::lidar::PERCEPTION_REGISTER_REGISTERER ( BaseClassifier  )

◆ PERCEPTION_REGISTER_REGISTERER() [3/13]

apollo::perception::lidar::PERCEPTION_REGISTER_REGISTERER ( BaseGroundDetector  )

◆ PERCEPTION_REGISTER_REGISTERER() [4/13]

apollo::perception::lidar::PERCEPTION_REGISTER_REGISTERER ( BaseLidarDetector  )

◆ PERCEPTION_REGISTER_REGISTERER() [5/13]

apollo::perception::lidar::PERCEPTION_REGISTER_REGISTERER ( BaseMultiShotTypeFusion  )

◆ PERCEPTION_REGISTER_REGISTERER() [6/13]

apollo::perception::lidar::PERCEPTION_REGISTER_REGISTERER ( BaseMultiTargetTracker  )

◆ PERCEPTION_REGISTER_REGISTERER() [7/13]

apollo::perception::lidar::PERCEPTION_REGISTER_REGISTERER ( BaseOneShotTypeFusion  )

◆ PERCEPTION_REGISTER_REGISTERER() [8/13]

apollo::perception::lidar::PERCEPTION_REGISTER_REGISTERER ( BasePointCloudPreprocessor  )

◆ PERCEPTION_REGISTER_REGISTERER() [9/13]

apollo::perception::lidar::PERCEPTION_REGISTER_REGISTERER ( BaseSequenceTypeFusion  )

◆ PERCEPTION_REGISTER_REGISTERER() [10/13]

apollo::perception::lidar::PERCEPTION_REGISTER_REGISTERER ( BaseSingleShotTypeFusion  )

◆ PERCEPTION_REGISTER_REGISTERER() [11/13]

apollo::perception::lidar::PERCEPTION_REGISTER_REGISTERER ( MlfBaseFilter  )

◆ PERCEPTION_REGISTER_REGISTERER() [12/13]

apollo::perception::lidar::PERCEPTION_REGISTER_REGISTERER ( SceneService  )

◆ PERCEPTION_REGISTER_REGISTERER() [13/13]

apollo::perception::lidar::PERCEPTION_REGISTER_REGISTERER ( SceneServiceContent  )

◆ PERCEPTION_REGISTER_SCENESERVICE() [1/2]

apollo::perception::lidar::PERCEPTION_REGISTER_SCENESERVICE ( GroundService  )

◆ PERCEPTION_REGISTER_SCENESERVICE() [2/2]

apollo::perception::lidar::PERCEPTION_REGISTER_SCENESERVICE ( ROIService  )

◆ PERCEPTION_REGISTER_SCENESERVICECONTENT() [1/2]

apollo::perception::lidar::PERCEPTION_REGISTER_SCENESERVICECONTENT ( GroundServiceContent  )

◆ PERCEPTION_REGISTER_SCENESERVICECONTENT() [2/2]

apollo::perception::lidar::PERCEPTION_REGISTER_SCENESERVICECONTENT ( ROIServiceContent  )

◆ PERCEPTION_REGISTER_SEQUENCETYPEFUSION() [1/2]

apollo::perception::lidar::PERCEPTION_REGISTER_SEQUENCETYPEFUSION ( CCRFMultiShotTypeFusion  )

◆ PERCEPTION_REGISTER_SEQUENCETYPEFUSION() [2/2]

apollo::perception::lidar::PERCEPTION_REGISTER_SEQUENCETYPEFUSION ( CCRFSequenceTypeFusion  )

◆ Pixel2Pc()

float apollo::perception::lidar::Pixel2Pc ( int  in_pixel,
float  in_size,
float  out_range 
)
inline

在文件 util.h52 行定义.

52 {
53 float res = 2.0f * out_range / in_size;
54 return out_range - (static_cast<float>(in_pixel) + 0.5f) * res;
55}

◆ PointNumDistance()

float apollo::perception::lidar::PointNumDistance ( const TrackedObjectConstPtr last_object,
const Eigen::VectorXf &  track_predict,
const TrackedObjectConstPtr new_object,
const double  time_diff 
)

Compute point num distance for given track & object

参数
last_objectobject for computing distance
track_predictpredicted state of track for computing distance
new_objectnew detected object for computing distance
time_difftime interval from last matching
返回
float distance

在文件 distance_collection.cc147 行定义.

150 {
151 // Compute point num distance for last object and new object
152 // range from 0 and 1
153
154 int old_point_number = static_cast<int>(
155 (last_object->object_ptr->lidar_supplement).cloud_world.size());
156 int new_point_number = static_cast<int>(
157 (new_object->object_ptr->lidar_supplement).cloud_world.size());
158
159 float point_num_dist =
160 static_cast<float>(fabs(old_point_number - new_point_number)) * 1.0f /
161 static_cast<float>(std::max(old_point_number, new_point_number));
162
163 return point_num_dist;
164}

◆ RemoveStaleDataFromMap()

void apollo::perception::lidar::RemoveStaleDataFromMap ( double  timestamp,
std::map< double, TrackedObjectPtr > *  data 
)

在文件 mlf_track_data.cc185 行定义.

186 {
187 auto iter = data->begin();
188 while (iter != data->end()) {
189 if (iter->first < timestamp) {
190 data->erase(iter++);
191 } else {
192 break;
193 }
194 }
195}

◆ SetMotionLabel()

void apollo::perception::lidar::SetMotionLabel ( PointMotionLabel  label,
uint8_t *  value 
)
inline

在文件 lidar_point_label.h65 行定义.

65 {
66 *value &= 15; // 15: 00001111
67 *value = (static_cast<uint8_t>(label) << 4) | (*value);
68}

◆ SetSemanticLabel()

void apollo::perception::lidar::SetSemanticLabel ( PointSemanticLabel  label,
uint8_t *  value 
)
inline

在文件 lidar_point_label.h51 行定义.

51 {
52 *value &= 240; // 240: 11110000
53 *value |= static_cast<uint8_t>(label);
54}

◆ TransformFromPCLXYZI()

void apollo::perception::lidar::TransformFromPCLXYZI ( const pcl::PointCloud< pcl::PointXYZI >::Ptr &  org_cloud_ptr,
const base::PointFCloudPtr out_cloud_ptr 
)
inline

在文件 pcl_util.h114 行定义.

116 {
117 for (size_t i = 0; i < org_cloud_ptr->size(); ++i) {
118 const auto& pt = org_cloud_ptr->at(i);
119 base::PointF point;
120 point.x = pt.x;
121 point.y = pt.y;
122 point.z = pt.z;
123 point.intensity = pt.intensity;
124 out_cloud_ptr->push_back(point);
125 }
126}

◆ TransformToPCLXYZI()

template<typename PointT >
void apollo::perception::lidar::TransformToPCLXYZI ( const base::AttributePointCloud< PointT > &  org_cloud,
const pcl::PointCloud< pcl::PointXYZI >::Ptr &  out_cloud_ptr 
)
inline

在文件 pcl_util.h100 行定义.

102 {
103 for (size_t i = 0; i < org_cloud.size(); ++i) {
104 PointT pt = org_cloud.at(i);
105 pcl::PointXYZI point;
106 point.x = static_cast<float>(pt.x);
107 point.y = static_cast<float>(pt.y);
108 point.z = static_cast<float>(pt.z);
109 point.intensity = static_cast<float>(pt.intensity);
110 out_cloud_ptr->push_back(point);
111 }
112}

◆ WritePcdByLabel()

bool apollo::perception::lidar::WritePcdByLabel ( const std::string &  file_path,
const base::PointFCloud cloud,
const LidarPointLabel label 
)
inline

在文件 pcl_util.h74 行定义.

76 {
77 pcl::PointCloud<PCLPointXYZIT> pcl_cloud;
78 for (size_t i = 0; i < cloud.size(); ++i) {
79 if (cloud.points_label().at(i) != static_cast<uint8_t>(label))
80 continue;
81 PCLPointXYZIT point;
82 point.x = cloud[i].x;
83 point.y = cloud[i].y;
84 point.z = cloud[i].z;
85 point.intensity = cloud[i].intensity;
86 point.timestamp = cloud.points_timestamp().at(i);
87 pcl_cloud.push_back(point);
88 }
89 try {
90 pcl::PCDWriter writer;
91 writer.writeBinaryCompressed(file_path, pcl_cloud);
92 } catch (const pcl::IOException& ex) {
93 AERROR << ex.detailedMessage();
94 return false;
95 }
96 return true;
97}
const std::vector< double > & points_timestamp() const
const std::vector< uint8_t > & points_label() const

变量说明

◆ EIGEN_ALIGN16

struct apollo::perception::lidar::PointCloudPreprocessorOptions apollo::perception::lidar::EIGEN_ALIGN16

◆ kPI

const double apollo::perception::lidar::kPI = 3.1415926535897932384626433832795

在文件 util.h31 行定义.

◆ STATIC_VELOCITY

const float apollo::perception::lidar::STATIC_VELOCITY = 0.01

在文件 mlf_motion_measurement.cc31 行定义.