Commit dc87d261 authored by oscar's avatar oscar

提交更新

parent 03ef1f59
......@@ -3,7 +3,6 @@
#include "Component.h"
#include <eigen3/Eigen/Dense>
#include <math.h>
#include <yaml-cpp/yaml.h>
#include "yaml_parser.h"
// #include "TransformPos.h"
#include <chrono>
......@@ -27,22 +26,21 @@ namespace juefx_tracking {
//获取yaml文件
std::string root_dir = this->declare_parameter<std::string>("root_dir", std::string(""));
int run_mode = this->declare_parameter<int>("run_mode", 1);
YAML::Node config;
if (run_mode == 1)
{
std::string entry_yaml = this->declare_parameter<std::string>("entry_yaml", std::string(""));
QichechengYamlParser parser;
int ret = parser.parse_yaml(entry_yaml, root_dir);
if (ret != 0)return;
config = parser.entry["TRACKING_YAML_NODE"];
m_config = parser.entry["TRACKING_YAML_NODE"];
}
else
{
std::string config_yaml = this->declare_parameter<std::string>("unittest_yaml", std::string(""));
config = YAML::LoadFile(config_yaml);
m_config = YAML::LoadFile(config_yaml);
}
m_tracking.Init(root_dir,config,[=](objTrackListPtr objsPtr){
m_tracking.Init(root_dir,m_config,[=](objTrackListPtr objsPtr){
TrackingPorcess(objsPtr);
});
}
......
......@@ -5,6 +5,7 @@
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <yaml-cpp/yaml.h>
#include "tier4_perception_msgs/msg/detected_objects_with_feature.hpp"
#include "tier4_perception_msgs/msg/detected_object_with_feature.hpp"
......@@ -40,6 +41,7 @@ class TrackingRos2 : public rclcpp::Node {
TrackingObj m_tracking;
YAML::Node m_config;
};
} // namespace juefx_tracking
......
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