32 AINFO <<
"Using " << name_;
39 control_debug_info_writer_
41 ACHECK(control_debug_info_writer_ !=
nullptr);
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());
57 ADEBUG <<
"control debug msg is: " << control_debug_info_msg_.ShortDebugString();
58 control_debug_info_writer_->Write(control_debug_info_msg_);
66 control_debug_info_msg_.Clear();
A general class to denote the return status of an API call.
static Status OK()
generate a success status.
common::Status Reset() override
reset demo control task
void Stop() override
stop DebugInfoControlTask
std::shared_ptr< DependencyInjector > injector_
common::Status Init(std::shared_ptr< DependencyInjector > injector) override
initialize DebugInfoControlTask
std::string Name() const override
DebugInfoControlTask name
DebugInfoControlTask()
constructor
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
Defines the DebugInfoControlTask class.
std::unique_ptr< Node > CreateNode(const std::string &node_name, const std::string &name_space)
optional apollo::common::Header header