Apollo 10.0
自动驾驶开放平台
apollo::planning::Task类 参考

#include <task.h>

类 apollo::planning::Task 继承关系图:
apollo::planning::Task 的协作图:

Public 成员函数

 Task ()
 
virtual ~Task ()=default
 
const std::string & Name () const
 
virtual bool Init (const std::string &config_dir, const std::string &name, const std::shared_ptr< DependencyInjector > &injector)
 
virtual common::Status Execute (Frame *frame, ReferenceLineInfo *reference_line_info)
 
virtual common::Status Execute (Frame *frame)
 

Protected 成员函数

template<typename T >
bool LoadConfig (T *config)
 

Protected 属性

Frameframe_
 
ReferenceLineInforeference_line_info_
 
std::shared_ptr< DependencyInjectorinjector_
 
std::string config_path_
 
std::string default_config_path_
 
std::string name_
 

详细描述

在文件 task.h37 行定义.

构造及析构函数说明

◆ Task()

apollo::planning::Task::Task ( )

在文件 task.cc32 行定义.

33 : frame_(nullptr),
34 reference_line_info_(nullptr),
35 injector_(nullptr),
36 config_path_(""),
38 name_("") {}
std::string config_path_
Definition task.h:61
std::shared_ptr< DependencyInjector > injector_
Definition task.h:59
ReferenceLineInfo * reference_line_info_
Definition task.h:58
std::string name_
Definition task.h:63
std::string default_config_path_
Definition task.h:62

◆ ~Task()

virtual apollo::planning::Task::~Task ( )
virtualdefault

成员函数说明

◆ Execute() [1/2]

Status apollo::planning::Task::Execute ( Frame frame)
virtual

apollo::planning::Decider, apollo::planning::PathGeneration , 以及 apollo::planning::TrajectoryOptimizer 重载.

在文件 task.cc66 行定义.

66 {
67 frame_ = frame;
68 return Status::OK();
69}
static Status OK()
generate a success status.
Definition status.h:60

◆ Execute() [2/2]

◆ Init()

bool apollo::planning::Task::Init ( const std::string &  config_dir,
const std::string &  name,
const std::shared_ptr< DependencyInjector > &  injector 
)
virtual

apollo::planning::FallbackPath, apollo::planning::LaneBorrowPath, apollo::planning::LaneChangePath, apollo::planning::LaneFollowPath, apollo::planning::OpenSpaceFallbackDecider, apollo::planning::OpenSpacePreStopDecider, apollo::planning::OpenSpaceRoiDecider, apollo::planning::OpenSpaceTrajectoryPartition, apollo::planning::OpenSpaceTrajectoryProvider, apollo::planning::PathDecider, apollo::planning::PathReferenceDecider, apollo::planning::PathTimeHeuristicOptimizer, apollo::planning::PiecewiseJerkSpeedOptimizer, apollo::planning::PiecewiseJerkSpeedNonlinearOptimizer, apollo::planning::PullOverPath, apollo::planning::ReusePath, apollo::planning::RssDecider, apollo::planning::RuleBasedStopDecider, apollo::planning::SpeedBoundsDecider, apollo::planning::SpeedDecider , 以及 apollo::planning::STBoundsDecider 重载.

在文件 task.cc40 行定义.

41 {
42 injector_ = injector;
43 name_ = name;
45 config_dir + "/" + ConfigUtil::TransformToPathName(name) + ".pb.txt";
46
47 // Get the name of this class.
48 int status;
49 std::string class_name =
50 abi::__cxa_demangle(typeid(*this).name(), 0, 0, &status);
51 // Generate the default task config path from PluginManager.
54 ->GetPluginConfPath<Task>(class_name, "conf/default_conf.pb.txt");
55 return true;
56}
std::string GetPluginConfPath(const std::string &class_name, const std::string &conf_name)
get plugin configuration file location
static PluginManager * Instance()
get singleton instance of PluginManager
static std::string TransformToPathName(const std::string &name)
Tranform the name to part of path.

◆ LoadConfig()

template<typename T >
bool apollo::planning::Task::LoadConfig ( T *  config)
protected

在文件 task.h67 行定义.

67 {
69 config);
70}
static bool LoadMergedConfig(const std::string &default_config_path, const std::string &config_path, T *config)
Load the config and merge the default and user defined config.
Definition config_util.h:76

◆ Name()

const std::string & apollo::planning::Task::Name ( ) const

在文件 task.cc58 行定义.

58{ return name_; }

类成员变量说明

◆ config_path_

std::string apollo::planning::Task::config_path_
protected

在文件 task.h61 行定义.

◆ default_config_path_

std::string apollo::planning::Task::default_config_path_
protected

在文件 task.h62 行定义.

◆ frame_

Frame* apollo::planning::Task::frame_
protected

在文件 task.h57 行定义.

◆ injector_

std::shared_ptr<DependencyInjector> apollo::planning::Task::injector_
protected

在文件 task.h59 行定义.

◆ name_

std::string apollo::planning::Task::name_
protected

在文件 task.h63 行定义.

◆ reference_line_info_

ReferenceLineInfo* apollo::planning::Task::reference_line_info_
protected

在文件 task.h58 行定义.


该类的文档由以下文件生成: