Apollo 10.0
自动驾驶开放平台
apollo::dreamview::TeleopService类 参考

#include <teleop.h>

apollo::dreamview::TeleopService 的协作图:

Public 成员函数

 TeleopService (WebSocketHandler *websocket)
 
void Start ()
 

详细描述

在文件 teleop.h38 行定义.

构造及析构函数说明

◆ TeleopService()

apollo::dreamview::TeleopService::TeleopService ( WebSocketHandler websocket)

在文件 teleop.cc69 行定义.

70 : node_(cyber::CreateNode("teleop")), websocket_(websocket) {
71 RegisterMessageHandlers();
72
73 teleop_status_["audio"] = false;
74 teleop_status_["audio_starting"] = false;
75 teleop_status_["audio_stopping"] = false;
76 teleop_status_["mic"] = false;
77 teleop_status_["mic_starting"] = false;
78 teleop_status_["mic_stopping"] = false;
79 teleop_status_["video"] = false;
80 teleop_status_["video_starting"] = false;
81 teleop_status_["video_stopping"] = false;
82 teleop_status_["pulling_over"] = false;
83 teleop_status_["e_stopping"] = false;
84 teleop_status_["resuming_autonomy"] = false;
85}
std::unique_ptr< Node > CreateNode(const std::string &node_name, const std::string &name_space)
Definition cyber.cc:33

成员函数说明

◆ Start()

void apollo::dreamview::TeleopService::Start ( )

在文件 teleop.cc87 行定义.

87 {
88 // TODO get topic names from proto
89 // TODO update proto to get all modems' info combined with rank
90
91 modem0_info_reader_ = node_->CreateReader<ModemInfo>(
92 modem0_channel, [this](const std::shared_ptr<ModemInfo> &msg) {
93 UpdateModem(modem0_id, msg);
94 });
95
96 modem1_info_reader_ = node_->CreateReader<ModemInfo>(
97 modem1_channel, [this](const std::shared_ptr<ModemInfo> &msg) {
98 UpdateModem(modem1_id, msg);
99 });
100
101 modem2_info_reader_ = node_->CreateReader<ModemInfo>(
102 modem2_channel, [this](const std::shared_ptr<ModemInfo> &msg) {
103 UpdateModem(modem2_id, msg);
104 });
105
106 planning_reader_ = node_->CreateReader<ADCTrajectory>(
107 planning_channel, [this](const std::shared_ptr<ADCTrajectory> &msg) {
108 UpdatePlanning(msg);
109 });
110
111 remote_daemon_cmd_writer_ =
112 node_->CreateWriter<DaemonCmd>(remote_daemon_cmd_channel);
113
114 local_daemon_cmd_writer_ =
115 node_->CreateWriter<DaemonCmd>(local_daemon_cmd_channel);
116
117 remote_daemon_rpt_reader_ = node_->CreateReader<DaemonRpt>(
119 [this](const std::shared_ptr<DaemonRpt> &msg) {
120 UpdateCarDaemonRpt(msg);
121 });
122
123 local_daemon_rpt_reader_ = node_->CreateReader<DaemonRpt>(
125 [this](const std::shared_ptr<DaemonRpt> &msg) {
126 UpdateOperatorDaemonRpt(msg);
127 });
128
129 action_command_client_ =
130 node_->CreateClient<apollo::external_command::ActionCommand,
131 CommandStatus>(FLAGS_action_command_topic);
132}
const std::string local_daemon_cmd_channel
Definition teleop.cc:64
const std::string modem2_channel
Definition teleop.cc:59
const std::string modem1_id
Definition teleop.cc:45
const std::string modem0_channel
Definition teleop.cc:57
const std::string modem1_channel
Definition teleop.cc:58
const std::string planning_channel
Definition teleop.cc:66
const std::string modem2_id
Definition teleop.cc:46
const std::string local_daemon_rpt_channel
Definition teleop.cc:65
const std::string remote_daemon_rpt_channel
Definition teleop.cc:62
const std::string modem0_id
Definition teleop.cc:44
const std::string remote_daemon_cmd_channel
Definition teleop.cc:60

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