Apollo 11.0
自动驾驶开放平台
apollo::control::DebugInfoControlTask类 参考

Publish the control debug msg. 更多...

#include <debug_info_control_task.h>

类 apollo::control::DebugInfoControlTask 继承关系图:
apollo::control::DebugInfoControlTask 的协作图:

Public 成员函数

 DebugInfoControlTask ()
 constructor
 
virtual ~DebugInfoControlTask ()=default
 destructor
 
common::Status Init (std::shared_ptr< DependencyInjector > injector) override
 initialize DebugInfoControlTask
 
common::Status ComputeControlCommand (const localization::LocalizationEstimate *localization, const canbus::Chassis *chassis, const planning::ADCTrajectory *trajectory, control::ControlCommand *cmd) override
 compute brake / throttle values based on current vehicle status and target trajectory
 
void Stop () override
 stop DebugInfoControlTask
 
common::Status Reset () override
 reset demo control task
 
std::string Name () const override
 DebugInfoControlTask name
 
- Public 成员函数 继承自 apollo::control::ControlTaskExtend
 ControlTaskExtend ()
 constructor
 
virtual ~ControlTaskExtend ()
 destructor
 
- Public 成员函数 继承自 apollo::control::ControlTask
 ControlTask ()=default
 constructor
 
virtual ~ControlTask ()=default
 destructor
 

Protected 属性

std::shared_ptr< DependencyInjector > injector_
 

额外继承的成员函数

- Protected 成员函数 继承自 apollo::control::ControlTaskExtend
template<typename T >
bool LoadParamsPipelineConfig (T *pipeline_config)
 
bool LoadCalibrationTable (const std::string &calibration_table_path, calibration_table *calibration_table_conf)
 
bool VehicleStatusIdentificationUpdate (const localization::LocalizationEstimate *localization, const canbus::Chassis *chassis, const planning::ADCTrajectory *trajectory)
 
bool IsForwardModel ()
 
bool IsEdgeFollow ()
 
bool CheckInPit (double pit_replan_check_time, double pit_replan_check_count, double vehicle_speed, bool replan)
 
bool IsLargeCurvature (const double ref_curvature, const double min_large_ref_curvature, bool *is_in_large_curvature)
 
bool IsLeftCurvature (const double ref_curvature)
 
double GetVehicleSpeed (std::shared_ptr< DependencyInjector > injector, const bool &use_filter, const double &filter_coeff)
 
double ThrottleCmdFilter (const bool &use_filter, const double &filter_coeff, const double &throttle)
 
- Protected 成员函数 继承自 apollo::control::ControlTask
template<typename T >
bool LoadConfig (T *config)
 
bool LoadCalibrationTable (calibration_table *calibration_table_conf)
 

详细描述

Publish the control debug msg.

在文件 debug_info_control_task.h 第 49 行定义.

构造及析构函数说明

◆ DebugInfoControlTask()

apollo::control::DebugInfoControlTask::DebugInfoControlTask ( )

constructor

在文件 debug_info_control_task.cc 第 31 行定义.

31 : name_("Debug Info Control Task") {
32 AINFO << "Using " << name_;
33}
#define AINFO
Definition log.h:42

◆ ~DebugInfoControlTask()

virtual apollo::control::DebugInfoControlTask::~DebugInfoControlTask ( )
virtualdefault

destructor

成员函数说明

◆ ComputeControlCommand()

Status apollo::control::DebugInfoControlTask::ComputeControlCommand ( const localization::LocalizationEstimate *  localization,
const canbus::Chassis *  chassis,
const planning::ADCTrajectory *  trajectory,
control::ControlCommand *  cmd 
)
overridevirtual

compute brake / throttle values based on current vehicle status and target trajectory

参数
localizationvehicle location
chassisvehicle status e.g., speed, acceleration
trajectorytrajectory generated by planning
cmdcontrol command
返回
Status computation status

实现了 apollo::control::ControlTask.

在文件 debug_info_control_task.cc 第 45 行定义.

49 {
50 control_debug_info_msg_.Clear();
51 if (injector_->control_process() && FLAGS_publish_control_debug_info) {
52 control_debug_info_msg_.CopyFrom(injector_->control_debug_info());
53 common::util::FillHeader(node_->Name(), &control_debug_info_msg_);
54 if (FLAGS_sim_by_record) {
55 control_debug_info_msg_.mutable_header()->set_timestamp_sec(chassis->header().timestamp_sec());
56 }
57 ADEBUG << "control debug msg is: " << control_debug_info_msg_.ShortDebugString();
58 control_debug_info_writer_->Write(control_debug_info_msg_);
59 }
60 return Status::OK();
61}
static Status OK()
generate a success status.
Definition status.h:60
std::shared_ptr< DependencyInjector > injector_
#define ADEBUG
Definition log.h:41

◆ Init()

Status apollo::control::DebugInfoControlTask::Init ( std::shared_ptr< DependencyInjector >  injector)
overridevirtual

initialize DebugInfoControlTask

返回
Status initialization status

实现了 apollo::control::ControlTask.

在文件 debug_info_control_task.cc 第 35 行定义.

35 {
36 // hook: Apollo License Verification: v_apollo_park
37 injector_ = injector;
38 node_ = ::apollo::cyber::CreateNode("control_debug");
39 control_debug_info_writer_
40 = node_->CreateWriter<::apollo::control::ControlDebugInfo>(FLAGS_control_debug_info_topic);
41 ACHECK(control_debug_info_writer_ != nullptr);
42 return Status::OK();
43}
#define ACHECK(cond)
Definition log.h:80
std::unique_ptr< Node > CreateNode(const std::string &node_name, const std::string &name_space)
Definition cyber.cc:33

◆ Name()

std::string apollo::control::DebugInfoControlTask::Name ( ) const
overridevirtual

DebugInfoControlTask name

返回
string controller name in string

重载 apollo::control::ControlTaskExtend .

在文件 debug_info_control_task.cc 第 70 行定义.

70 {
71 return name_;
72}

◆ Reset()

Status apollo::control::DebugInfoControlTask::Reset ( )
overridevirtual

reset demo control task

返回
Status reset status

实现了 apollo::control::ControlTask.

在文件 debug_info_control_task.cc 第 65 行定义.

65 {
66 control_debug_info_msg_.Clear();
67 return Status::OK();
68}

◆ Stop()

void apollo::control::DebugInfoControlTask::Stop ( )
overridevirtual

stop DebugInfoControlTask

实现了 apollo::control::ControlTask.

在文件 debug_info_control_task.cc 第 63 行定义.

63{}

类成员变量说明

◆ injector_

std::shared_ptr<DependencyInjector> apollo::control::DebugInfoControlTask::injector_
protected

在文件 debug_info_control_task.h 第 100 行定义.


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