apollo icon indicating copy to clipboard operation
apollo copied to clipboard

[PREDICTION] a typo maybe ?

Open ntutangyun opened this issue 6 years ago • 2 comments

Hi,

I found the following mismatch in the Prediction source code. I don't fully understand the code yet. but please help check anyway :)

// modlues/prediction/common/message_process.cc:  line 62
  
 if (!FLAGS_use_navigation_mode && !PredictionMap::Ready()) {
    AERROR << "Map cannot be loaded.";
    return false;
  }

// modules/prediction/prediction_component.cc: line 185

  // Update relative map if needed
  if (FLAGS_use_navigation_mode && !PredictionMap::Ready()) {
    AERROR << "Relative map is empty.";
    return false;
  }

there is a not "!" before the FLAGS_use_navigation_mode in the first snippet, not in the second.

ntutangyun avatar Jun 03 '20 16:06 ntutangyun

Hi ntutangyun,

Thank you for your question. I think there is no typo. In the case of modlues/prediction/common/message_process.cc: line 62, we check if map is ready in the initial status while we are NOT in navigation mode. But in navigation mode, we check if map is ready in every frame run instead of initial status.

kechxu avatar Jun 24 '20 04:06 kechxu

@kechxu alright. thanks for your reply.

ntutangyun avatar Jun 24 '20 15:06 ntutangyun