Update yaml_config.cpp
This commit is contained in:
parent
20b623596f
commit
bd6b891fa4
@ -2,12 +2,18 @@
|
||||
|
||||
#include "yaml_config.h"
|
||||
#include <iostream>
|
||||
#include <filesystem>
|
||||
|
||||
YAML::Node ReadConfigYamlFile();
|
||||
|
||||
static std::string yaml_config_path =
|
||||
"/media/Projects/guangpo_lidar/src/guangpo_lidar/yaml_config/yaml_config.yaml";
|
||||
|
||||
// static std::string yaml_config_path =
|
||||
// "/media/Projects/guangpo_lidar/src/guangpo_lidar/yaml_config/yaml_config.yaml";
|
||||
static std::string yaml_config_path = []()->std::string{
|
||||
std::filesystem::path current_dir =
|
||||
std::filesystem::path(__FILE__).parent_path();
|
||||
std::filesystem::path yaml_path = current_dir / "yaml_config.yaml";
|
||||
return yaml_path;
|
||||
}();
|
||||
|
||||
YAML::Node yaml_config = ReadConfigYamlFile();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user