29#include "modules/common_msgs/control_msgs/control_cmd.pb.h"
30#include "modules/common_msgs/localization_msgs/localization.pb.h"
31#include "modules/common_msgs/planning_msgs/planning.pb.h"
32#include "modules/control/control_component/proto/calibration_table.pb.h"
95 virtual std::string
Name()
const = 0;
103 template <
typename T>
107 std::string calibration_table_path = FLAGS_calibration_table_file;
110 calibration_table_conf)) {
111 AERROR <<
"Load calibration table failed!";
114 AINFO <<
"Load the calibraiton table file successfully, file path: "
115 << calibration_table_path;
123 std::string class_name =
124 abi::__cxa_demangle(
typeid(*this).name(), 0, 0, &status);
126 std::string config_path_ =
129 "conf/controller_conf.pb.txt");
132 AERROR <<
"Load config of " << class_name <<
" failed!";
135 AINFO <<
"Load the [" << class_name
136 <<
"] config file successfully, file path: " << config_path_;
A general class to denote the return status of an API call.
virtual common::Status ComputeControlCommand(const localization::LocalizationEstimate *localization, const canbus::Chassis *chassis, const planning::ADCTrajectory *trajectory, control::ControlCommand *cmd)=0
compute control command based on current vehicle status and target trajectory
virtual std::string Name() const =0
controller name
virtual common::Status Init(std::shared_ptr< DependencyInjector > injector)=0
initialize Controller
virtual void Stop()=0
stop controller
virtual common::Status Reset()=0
reset Controller
virtual ~ControlTask()=default
destructor
bool LoadCalibrationTable(calibration_table *calibration_table_conf)
bool LoadConfig(T *config)
ControlTask()=default
constructor
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
bool GetProtoFromFile(const std::string &file_name, google::protobuf::Message *message)
Parses the content of the file specified by the file_name as a representation of protobufs,...