Apollo 10.0
自动驾驶开放平台
main.cc 文件参考
#include <filesystem>
#include "cyber/common/global_data.h"
#include "cyber/init.h"
#include "modules/dreamview/backend/dreamview.h"
main.cc 的引用(Include)关系图:

浏览源代码.

函数

int main (int argc, char *argv[])
 

函数说明

◆ main()

int main ( int  argc,
char *  argv[] 
)

在文件 main.cc 第 23 行定义.

23 {
24 // set working directory to APOLLO_RUNTIME_PATH for relative file paths
25 const char* apollo_runtime_path = std::getenv("APOLLO_RUNTIME_PATH");
26 if (apollo_runtime_path != nullptr) {
27 if (std::filesystem::is_directory(
28 std::filesystem::status(apollo_runtime_path))) {
29 std::filesystem::current_path(apollo_runtime_path);
30 }
31 }
32 google::ParseCommandLineFlags(&argc, &argv, true);
33 // Added by caros to improve dv performance
34 apollo::cyber::GlobalData::Instance()->SetProcessGroup("dreamview_sched");
35 apollo::cyber::Init(argv[0]);
36
38 const bool init_success = dreamview.Init().ok() && dreamview.Start().ok();
39 if (!init_success) {
40 AERROR << "Failed to initialize dreamview server";
41 return -1;
42 }
44 return 0;
45}
bool ok() const
check whether the return status is OK.
Definition status.h:67
apollo::common::Status Init()
Definition dreamview.cc:54
apollo::common::Status Start()
Definition dreamview.cc:124
#define AERROR
Definition log.h:44
void WaitForShutdown()
Definition state.h:50
bool Init(const char *binary_name, const std::string &dag_info)
Definition init.cc:98