Commit 38c15038 authored by oscar's avatar oscar

提交配置更新

parent 1653bd4e
......@@ -9,6 +9,7 @@
#ifdef _USING_NSIGHT_
#include <nvToolsExt.h>
#endif
#include "yaml_parser.h"
float to360(float rot_y,float lidar_x_angle)
......@@ -165,21 +166,25 @@ void TrackingRos::Init(ros::NodeHandle& nh)
int run_mode = 0;
nh.param<int>("run_mode", run_mode, 1);
std::string config_yaml;
std::string yaml_config;
YAML::Node config;
if (run_mode == 1)
{
std::string entry_yaml;
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["TRACKING_YAML_NODE"];
config = m_config;
}
else
{
private_nh.param<std::string>("unittest_yaml", config_yaml, "");
private_nh.param<std::string>("yaml_config", yaml_config, "");
m_config = YAML::LoadFile(config_yaml);
config = YAML::LoadFile(yaml_config.c_str())
}
m_config = YAML::LoadFile(config_yaml);
//std::string folder,yaml;
//nh.param<std::string>("project_path", folder, "/home/nvidia/catkin_ws/src/jfxrosperceiver");
......@@ -221,7 +226,6 @@ void TrackingRos::Init(ros::NodeHandle& nh)
values.push_back(matrix_angle_r_value);
m_tracker.SetValues(values);
YAML::Node config = YAML::LoadFile(yaml_config.c_str());
auto cfg = config["TRACKING"];
m_trans = cfg["TRANS"].as<std::vector<std::vector<double>>>();
......
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