pl debug
This commit is contained in:
parent
681fa81409
commit
3a4c1191c0
@ -411,9 +411,12 @@ void PL_ProcThread()
|
||||
task_status = TaskStatus::PATH_FINISHED; // 单路径完成
|
||||
LOG_INFO("设置任务状态为 PATH_FINISHED");
|
||||
|
||||
// 短暂休眠,确保车辆停稳
|
||||
// 短暂休眠,确保车辆停稳,同时检查退出标志
|
||||
LOG_INFO("车辆停稳中...");
|
||||
sleep(3);
|
||||
for (int i = 0; i < 30 && !thread_exit_flag; ++i)
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else if (des_pos != -1)
|
||||
@ -447,7 +450,20 @@ void PL_ProcThread()
|
||||
void* pl_thread(void* args)
|
||||
{
|
||||
(void)args;
|
||||
sleep(3);
|
||||
// 等待3秒,但每100ms检查一次退出标志
|
||||
for (int i = 0; i < 30 && !thread_exit_flag; ++i)
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
}
|
||||
|
||||
if (thread_exit_flag)
|
||||
{
|
||||
LOG_INFO("pl_thread 收到退出信号,提前退出");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// 重置最近点索引,允许在新任务上自由搜索
|
||||
g_last_road_pos = -1;
|
||||
|
||||
if (!load_path_file())
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user