Commit 257df925 authored by oscar's avatar oscar

提交配置修改

parent 54952e48
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <iostream> #include <iostream>
#include <memory> #include <memory>
#include "Component.h" #include "Component.h"
#include "yaml_parser.h"
int EventsRos::loadConfig(ros::NodeHandle& nh) int EventsRos::loadConfig(ros::NodeHandle& nh)
{ {
...@@ -23,15 +24,18 @@ int EventsRos::loadConfig(ros::NodeHandle& nh) ...@@ -23,15 +24,18 @@ int EventsRos::loadConfig(ros::NodeHandle& nh)
{ {
std::string entry_yaml; std::string entry_yaml;
private_nh.param<std::string>("entry_yaml", entry_yaml, "/home/nvidia/oscar/catkin_ws/src/jfx_yolo5/"); private_nh.param<std::string>("entry_yaml", entry_yaml, "/home/nvidia/oscar/catkin_ws/src/jfx_yolo5/");
QichechengYamlParser parser;
int ret = parser.parse_yaml(entry_yaml, m_root_dir);
if (ret != 0)return -1;
m_config = parser.entry["EVENT_YAML_NODE"];
} }
else else
{ {
private_nh.param<std::string>("unittest_yaml", config_yaml, ""); private_nh.param<std::string>("unittest_yaml", config_yaml, "");
m_config = YAML::LoadFile(config_yaml);
} }
m_config = YAML::LoadFile(config_yaml);
EventsConfig& config = m_jfx_events.m_cfg; EventsConfig& config = m_jfx_events.m_cfg;
m_devNo = m_config["devNo"].as<std::string>(); m_devNo = m_config["devNo"].as<std::string>();
//nh.param<std::string>("devNo", m_devNo, "none"); //nh.param<std::string>("devNo", m_devNo, "none");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment