Apollo 10.0
自动驾驶开放平台
teleop.cc 文件参考
#include <termios.h>
#include <cstdio>
#include <iostream>
#include <memory>
#include <thread>
#include "modules/common_msgs/chassis_msgs/chassis.pb.h"
#include "modules/common_msgs/control_msgs/control_cmd.pb.h"
#include "cyber/common/log.h"
#include "cyber/common/macros.h"
#include "cyber/cyber.h"
#include "cyber/init.h"
#include "cyber/time/time.h"
#include "modules/canbus/vehicle/vehicle_controller.h"
#include "modules/common/adapters/adapter_gflags.h"
#include "modules/common/configs/vehicle_config_helper.h"
#include "modules/common/util/message_util.h"
teleop.cc 的引用(Include)关系图:

浏览源代码.

函数

 DEFINE_double (throttle_inc_delta, 2.0, "throttle pedal command delta percentage.")
 
 DEFINE_double (brake_inc_delta, 2.0, "brake pedal delta percentage")
 
 DEFINE_double (steer_inc_delta, 2.0, "steer delta percentage")
 
 DEFINE_bool (use_acceleration, false, "switch to use acceleration instead of throttle pedal and brake pedal")
 
int main (int32_t argc, char **argv)
 

函数说明

◆ DEFINE_bool()

DEFINE_bool ( use_acceleration  ,
false  ,
"switch to use acceleration instead of throttle pedal and brake pedal"   
)

◆ DEFINE_double() [1/3]

DEFINE_double ( brake_inc_delta  ,
2.  0,
"brake pedal delta percentage"   
)

◆ DEFINE_double() [2/3]

DEFINE_double ( steer_inc_delta  ,
2.  0,
"steer delta percentage"   
)

◆ DEFINE_double() [3/3]

DEFINE_double ( throttle_inc_delta  ,
2.  0,
"throttle pedal command delta percentage."   
)

◆ main()

int main ( int32_t  argc,
char **  argv 
)

在文件 teleop.cc 第 488 行定义.

488 {
489 apollo::cyber::Init(argv[0]);
490 FLAGS_alsologtostderr = true;
491 FLAGS_v = 3;
492
493 google::ParseCommandLineFlags(&argc, &argv, true);
494
495 Teleop teleop;
496
497 if (teleop.Start() != 0) {
498 AERROR << "Teleop start failed.";
499 return -1;
500 }
501 Teleop::PrintKeycode();
503 teleop.Stop();
504 AINFO << "Teleop exit done.";
505 return 0;
506}
#define AERROR
Definition log.h:44
#define AINFO
Definition log.h:42
void WaitForShutdown()
Definition state.h:50
bool Init(const char *binary_name, const std::string &dag_info)
Definition init.cc:98