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

apollo::prediction 更多...

命名空间

namespace  math_util
 
namespace  network
 apollo::prediction::network
 
namespace  predictor_util
 

class  ADCTrajectoryContainer
 
class  AffineTransform
 
class  BaseThreadPool
 
struct  CarPosition
 
class  Container
 
class  ContainerManager
 
class  CostEvaluator
 
class  CruiseMLPEvaluator
 
class  CruiseScenarioFeatures
 
class  CyclistKeepLaneEvaluator
 
struct  DataForLearning
 
struct  DataForTuning
 
class  EmptyPredictor
 
class  EnvironmentFeatures
 
class  Evaluator
 
class  EvaluatorManager
 
struct  EvaluatorModelConf
 
class  EvaluatorSubmodule
 
class  ExtrapolationPredictor
 
class  FakePredictionComponent
 class FakePredictionComponent This class generates fake prediction messages. 更多...
 
struct  Feature
 
class  FeatureExtractor
 
class  FeatureOutput
 
struct  Features
 
struct  FnnVehicleModel
 
struct  FrameEnv
 
class  FreeMovePredictor
 
struct  Intent
 
class  InteractionFilter
 
class  InteractionPredictor
 
class  JointlyPredictionPlanningEvaluator
 
class  JunctionAnalyzer
 
struct  JunctionExit
 
struct  JunctionFeature
 
class  JunctionMapEvaluator
 
class  JunctionMLPEvaluator
 
class  JunctionPredictor
 
class  JunctionScenarioFeatures
 
class  KMLMapBasedTest
 
struct  Lane
 
class  LaneAggregatingEvaluator
 
struct  LaneFeature
 
struct  LaneGraph
 
struct  LaneObstacle
 
struct  LanePoint
 
class  LaneScanningEvaluator
 
struct  LaneSegment
 
struct  LaneSequence
 
class  LaneSequencePredictor
 
struct  Layer
 
class  LevelThreadPool
 
struct  ListDataForLearning
 
struct  ListDataForTuning
 
struct  ListFrameEnv
 
struct  ListPredictionResult
 
struct  Matrix
 
class  MessageProcess
 
class  MLPEvaluator
 
struct  Model
 
class  ModelBase
 
struct  ModelConf
 
class  ModelManager
 
class  MoveSequencePredictor
 
class  MultiAgentEvaluator
 
class  MultiAgentPedestrianCpuTorch
 
class  MultiAgentPedestrianGpuTorch
 
class  MultiAgentVehicleCpuTorch
 
class  MultiAgentVehicleGpuTorch
 
struct  NearbyObstacle
 
struct  NetParameter
 
class  Obstacle
 Prediction obstacle. 更多...
 
class  ObstacleClusters
 
struct  ObstacleConf
 
struct  ObstacleHistory
 
struct  ObstacleIntent
 
struct  ObstacleInteractiveTag
 
struct  ObstaclePriority
 
class  ObstaclesContainer
 
class  ObstaclesPrioritizer
 
class  PedestrianInteractionEvaluator
 
struct  Performance
 
struct  Polyline
 
class  PoseContainer
 
class  PredictionComponent
 
struct  PredictionConf
 
class  PredictionConstants
 
class  PredictionMap
 
struct  PredictionObstacle
 
struct  PredictionObstacles
 
struct  PredictionPathPoint
 
struct  PredictionResult
 
class  PredictionThreadPool
 
struct  PredictionTrajectoryPoint
 
class  Predictor
 
class  PredictorManager
 
class  PredictorSubmodule
 
class  RightOfWay
 
class  RoadGraph
 
struct  Scenario
 
class  ScenarioAnalyzer
 
class  ScenarioFeatures
 
class  ScenarioManager
 
class  SemanticLSTMEvaluator
 
class  SemanticLstmPedestrianCpuTorch
 
class  SemanticLstmPedestrianGpuTorch
 
class  SemanticLstmVehicleCpuTorch
 
class  SemanticLstmVehicleGpuTorch
 
class  SemanticMap
 
class  SequencePredictor
 
class  SingleLanePredictor
 
struct  StopSign
 
class  StoryTellingContainer
 
class  SubmoduleOutput
 
struct  TopicConf
 
struct  Trajectory
 
class  ValidationChecker
 
struct  Vector
 
class  VectorNet
 
class  VectornetEvaluator
 
struct  VectorNetFeature
 
struct  VerificationSample
 
struct  VNVector
 
struct  WorldCoord
 

类型定义

using ConstLaneInfoPtr = std::shared_ptr< const LaneInfo >
 
using Point = apollo::common::Point3D
 
using IdObstacleListMap = std::unordered_map< int, std::list< Obstacle * > >
 
using FeatureVector = std::vector< std::vector< std::vector< double > > >
 
using PidVector = std::vector< std::vector< double > >
 
using LaneInfoPtr = std::shared_ptr< const LaneInfo >
 
using JunctionInfoPtr = std::shared_ptr< const JunctionInfo >
 

枚举

enum  ATTRIBUTE_TYPE {
  ROAD , LANE_UNKOWN , LANE_DOTTED_YELLOW , LANE_DOTTED_WHITE ,
  LANE_SOLID_YELLOW , LANE_SOLID_WHITE , LANE_DOUBLE_YELLOW , LANE_CURB ,
  JUNCTION , CROSSWALK
}
 
enum  BOUNDARY_TYPE { UNKNOW , NORMAL , LEFT_BOUNDARY , RIGHT_BOUNDARY }
 

函数

void GetRecordFileNames (const boost::filesystem::path &p, std::vector< std::string > *record_files)
 
double ComputeMean (const std::vector< double > &nums, size_t start, size_t end)
 
void WarmUp (const std::vector< torch::jit::IValue > &torch_inputs, torch::jit::script::Module *model, at::Tensor *default_output)
 warm up function to avoid slowly inference of torch model
 
void GenerateDataForLearning ()
 
 CYBER_REGISTER_COMPONENT (FakePredictionComponent)
 

详细描述

类型定义说明

◆ ConstLaneInfoPtr

typedef std::shared_ptr< const LaneInfo > apollo::prediction::ConstLaneInfoPtr

在文件 junction_analyzer.cc32 行定义.

◆ FeatureVector

using apollo::prediction::FeatureVector = typedef std::vector<std::vector<std::vector<double> >>

在文件 vector_net.h33 行定义.

◆ IdObstacleListMap

using apollo::prediction::IdObstacleListMap = typedef std::unordered_map<int, std::list<Obstacle*> >

在文件 evaluator_manager.cc46 行定义.

◆ JunctionInfoPtr

using apollo::prediction::JunctionInfoPtr = typedef std::shared_ptr<const JunctionInfo>

在文件 feature_extractor.cc29 行定义.

◆ LaneInfoPtr

using apollo::prediction::LaneInfoPtr = typedef std::shared_ptr<const LaneInfo>

在文件 feature_extractor.cc28 行定义.

◆ PidVector

using apollo::prediction::PidVector = typedef std::vector<std::vector<double> >

在文件 vector_net.h34 行定义.

◆ Point

在文件 pose_container.cc28 行定义.

枚举类型说明

◆ ATTRIBUTE_TYPE

枚举值
ROAD 
LANE_UNKOWN 
LANE_DOTTED_YELLOW 
LANE_DOTTED_WHITE 
LANE_SOLID_YELLOW 
LANE_SOLID_WHITE 
LANE_DOUBLE_YELLOW 
LANE_CURB 
JUNCTION 
CROSSWALK 

在文件 vector_net.h36 行定义.

◆ BOUNDARY_TYPE

枚举值
UNKNOW 
NORMAL 
LEFT_BOUNDARY 
RIGHT_BOUNDARY 

在文件 vector_net.h49 行定义.

函数说明

◆ ComputeMean()

double apollo::prediction::ComputeMean ( const std::vector< double > &  nums,
size_t  start,
size_t  end 
)

在文件 cruise_mlp_evaluator.cc37 行定义.

37 {
38 int count = 0;
39 double sum = 0.0;
40 for (size_t i = start; i <= end && i < nums.size(); i++) {
41 sum += nums[i];
42 ++count;
43 }
44 return (count == 0) ? 0.0 : sum / count;
45}

◆ CYBER_REGISTER_COMPONENT()

apollo::prediction::CYBER_REGISTER_COMPONENT ( FakePredictionComponent  )

◆ GenerateDataForLearning()

void apollo::prediction::GenerateDataForLearning ( )

在文件 records_to_offline_data.cc30 行定义.

30 {
32 if (!FeatureOutput::Ready()) {
33 AERROR << "Feature output is not ready.";
34 return;
35 }
36 if (FLAGS_prediction_offline_bags.empty()) {
37 return;
38 }
39
40 PredictionConf prediction_conf;
41 if (!cyber::common::GetProtoFromFile(FLAGS_prediction_conf_file,
42 &prediction_conf)) {
43 AERROR << "Unable to load adapter conf file: "
44 << FLAGS_prediction_adapter_config_filename;
45 return;
46 }
47 ADEBUG << "Adapter config file is loaded into: "
48 << prediction_conf.ShortDebugString();
49
50 auto container_manager = std::make_shared<ContainerManager>();
51 EvaluatorManager evaluator_manager;
52 PredictorManager predictor_manager;
53 ScenarioManager scenario_manager;
54
55 if (!MessageProcess::Init(container_manager.get(), &evaluator_manager,
56 &predictor_manager, prediction_conf)) {
57 return;
58 }
59 const std::vector<std::string> inputs =
60 absl::StrSplit(FLAGS_prediction_offline_bags, ':');
61 for (const auto& input : inputs) {
62 std::vector<std::string> offline_bags;
63 GetRecordFileNames(boost::filesystem::path(input), &offline_bags);
64 std::sort(offline_bags.begin(), offline_bags.end());
65 AINFO << "For input " << input << ", found " << offline_bags.size()
66 << " rosbags to process";
67 for (std::size_t i = 0; i < offline_bags.size(); ++i) {
68 AINFO << "\tProcessing: [ " << i << " / " << offline_bags.size()
69 << " ]: " << offline_bags[i];
70 MessageProcess::ProcessOfflineData(prediction_conf, container_manager,
71 &evaluator_manager, &predictor_manager,
72 &scenario_manager, offline_bags[i]);
73 }
74 }
75 FeatureOutput::Close();
76}
#define ADEBUG
Definition log.h:41
#define AERROR
Definition log.h:44
#define AINFO
Definition log.h:42
void GetRecordFileNames(const boost::filesystem::path &p, std::vector< std::string > *record_files)

◆ GetRecordFileNames()

void apollo::prediction::GetRecordFileNames ( const boost::filesystem::path &  p,
std::vector< std::string > *  record_files 
)

在文件 data_extraction.cc24 行定义.

25 {
26 ACHECK(record_files);
27 if (!boost::filesystem::exists(p)) {
28 return;
29 }
30 if (boost::filesystem::is_regular_file(p)) {
31 AINFO << "Found record file: " << p.c_str();
32 record_files->push_back(p.c_str());
33 return;
34 }
35 if (boost::filesystem::is_directory(p)) {
36 for (auto& entry : boost::make_iterator_range(
37 boost::filesystem::directory_iterator(p), {})) {
38 GetRecordFileNames(entry.path(), record_files);
39 }
40 }
41}
#define ACHECK(cond)
Definition log.h:80

◆ WarmUp()

void apollo::prediction::WarmUp ( const std::vector< torch::jit::IValue > &  torch_inputs,
torch::jit::script::Module *  model,
at::Tensor *  default_output 
)

warm up function to avoid slowly inference of torch model

参数
torch_inputsinput vector of torch model
modeltorch model instance
default_outputpointer of output, which is usually maintained by evaluator

在文件 warm_up.cc28 行定义.

30 {
31 for (uint32_t i = 0; i < FLAGS_warm_up_times; i++) {
32 if (default_output_ptr != nullptr)
33 *default_output_ptr =
34 model->forward(torch_inputs).toTensor().to(torch::kCPU);
35 else
36 model->forward(torch_inputs);
37 }
38}