Commit a27a9f5bc106c1dfc3188495d61e088e9488c380
1 parent
39b31e88
补交越线相关参数代码逻辑
Showing
1 changed file
with
28 additions
and
0 deletions
src/ai_platform/task_param_manager.cpp
@@ -113,6 +113,17 @@ bool copy_algor_param_aux(const algorithm_type_t &algor_type, const std::string | @@ -113,6 +113,17 @@ bool copy_algor_param_aux(const algorithm_type_t &algor_type, const std::string | ||
113 | *((algor_config_param_type *)algor_param); // deep copy. | 113 | *((algor_config_param_type *)algor_param); // deep copy. |
114 | } break; | 114 | } break; |
115 | 115 | ||
116 | + case algorithm_type_t::HUMAN_CROSSING_LINE: | ||
117 | + case algorithm_type_t::HUMAN_CLIMB: | ||
118 | + case algorithm_type_t::VEHICLE_ILLEGAL_CROSSING_LINE: | ||
119 | + { | ||
120 | + m_algor_config_params[task_id].human_algors.insert(algor_type); | ||
121 | + using algor_config_param_type = algor_config_param_illegal_crossing_line; | ||
122 | + copied_algor_param->algor_param = new algor_config_param_type; | ||
123 | + *((algor_config_param_type *)(copied_algor_param->algor_param)) = | ||
124 | + *((algor_config_param_type *)algor_param); // deep copy. | ||
125 | + } break; | ||
126 | + | ||
116 | 127 | ||
117 | //221026byzsh--------------------------------------------------------- | 128 | //221026byzsh--------------------------------------------------------- |
118 | case algorithm_type_t::ROAD_WORK_DET: { | 129 | case algorithm_type_t::ROAD_WORK_DET: { |
@@ -356,6 +367,20 @@ void task_param_manager::delete_task_param(string task_id) { | @@ -356,6 +367,20 @@ void task_param_manager::delete_task_param(string task_id) { | ||
356 | break; | 367 | break; |
357 | } | 368 | } |
358 | 369 | ||
370 | + case algorithm_type_t::HUMAN_CROSSING_LINE: | ||
371 | + case algorithm_type_t::HUMAN_CLIMB: | ||
372 | + case algorithm_type_t::VEHICLE_ILLEGAL_CROSSING_LINE: | ||
373 | + { | ||
374 | + algor_config_param_illegal_crossing_line *algor_param = | ||
375 | + (algor_config_param_illegal_crossing_line *)((algor_init_config_param_t *)m_task_params[task_id][iter.first]) | ||
376 | + ->algor_param; | ||
377 | + if (algor_param) { | ||
378 | + delete (algor_config_param_illegal_crossing_line *)((algor_init_config_param_t *)m_task_params[task_id][iter.first]) | ||
379 | + ->algor_param; | ||
380 | + ((algor_init_config_param_t *)m_task_params[task_id][iter.first])->algor_param = nullptr; | ||
381 | + } | ||
382 | + break; | ||
383 | + } | ||
359 | 384 | ||
360 | //221026byzsh--------------------------------------------------------- | 385 | //221026byzsh--------------------------------------------------------- |
361 | case algorithm_type_t::ROAD_WORK_DET: { | 386 | case algorithm_type_t::ROAD_WORK_DET: { |
@@ -550,6 +575,9 @@ bool task_param_manager::task_has_vpt_algor(const std::string &task_id) { | @@ -550,6 +575,9 @@ bool task_param_manager::task_has_vpt_algor(const std::string &task_id) { | ||
550 | 575 | ||
551 | return (algor_map->find(algorithm_type_t::HUMAN_GATHER) != algor_map->end() || | 576 | return (algor_map->find(algorithm_type_t::HUMAN_GATHER) != algor_map->end() || |
552 | algor_map->find(algorithm_type_t::HUMAN_SNAPSHOT) != algor_map->end() || | 577 | algor_map->find(algorithm_type_t::HUMAN_SNAPSHOT) != algor_map->end() || |
578 | + algor_map->find(algorithm_type_t::HUMAN_CROSSING_LINE) != algor_map->end() || | ||
579 | + algor_map->find(algorithm_type_t::HUMAN_CLIMB) != algor_map->end() || | ||
580 | + algor_map->find(algorithm_type_t::VEHICLE_ILLEGAL_CROSSING_LINE) != algor_map->end() || | ||
553 | algor_map->find(algorithm_type_t::NONMOTOR_VEHICLE_SNAPSHOT) != algor_map->end() || | 581 | algor_map->find(algorithm_type_t::NONMOTOR_VEHICLE_SNAPSHOT) != algor_map->end() || |
554 | algor_map->find(algorithm_type_t::SMOKING_DET) != algor_map->end() || | 582 | algor_map->find(algorithm_type_t::SMOKING_DET) != algor_map->end() || |
555 | algor_map->find(algorithm_type_t::NO_REFLECTIVE_CLOTHING) != algor_map->end() || | 583 | algor_map->find(algorithm_type_t::NO_REFLECTIVE_CLOTHING) != algor_map->end() || |