18 #ifndef _DS3D_DATARENDER_LIDAR_FILE_RENDER_CONFIG__H
19 #define _DS3D_DATARENDER_LIDAR_FILE_RENDER_CONFIG__H
21 #include <ds3d/common/common.h>
22 #include <ds3d/common/func_utils.h>
24 #include "ds3d/common/hpp/yaml_config.hpp"
26 #define _PATH_MAX 4096
28 namespace ds3d {
namespace impl {
namespace lidarrender {
38 parseBaseConfig(
const std::string& content,
const std::string& path, Config& config)
42 "parse dataloader component content failed");
43 YAML::Node node = YAML::Load(config.compConfig.configBody);
45 if (node[
"frames_save_path"]) {
46 config.lidarFrameSavePath = node[
"frames_save_path"].as<std::string>();
47 if(config.lidarFrameSavePath[0] !=
'/') {
48 if (!realpath(path.c_str(), absRealFilePath)) {
49 if (errno != ENOENT) {
54 std::string tmpPath = absRealFilePath;
55 int pos = tmpPath.find_last_of(
"/");
56 config.lidarFrameSavePath = tmpPath.substr(0, pos+1) + config.lidarFrameSavePath;
57 if(config.lidarFrameSavePath.back() !=
'/')
58 config.lidarFrameSavePath +=
'/';
60 LOG_DEBUG(
"config path %s",config.lidarFrameSavePath.c_str());
63 if(node[
"input_datamap_key"]) {
64 config.inputDatamapKey = node[
"input_datamap_key"].as<std::string>();
74 #endif // _DS3D_DATARENDER_LIDAR_FILE_RENDER_CONFIG__H