提交 1fa3e438 编写于 作者: H Hongyi 提交者: Xiangquan Xiao

Prediction: enable SetConsideredObstacleIds

上级 dbeb37cd
......@@ -331,16 +331,12 @@ int ObstaclesContainer::PerceptionIdToPredictionId(const int perception_id) {
void ObstaclesContainer::BuildLaneGraph() {
// Go through every obstacle in the current frame, after some
// sanity checks, build lane graph for non-junction cases.
for (const int id : curr_frame_predictable_obstacle_ids_) {
for (const int id : curr_frame_considered_obstacle_ids_) {
Obstacle* obstacle_ptr = GetObstacle(id);
if (obstacle_ptr == nullptr) {
AERROR << "Null obstacle found.";
continue;
}
if (obstacle_ptr->ToIgnore()) {
ADEBUG << "Ignore obstacle [" << obstacle_ptr->id() << "]";
continue;
}
ADEBUG << "Building Lane Graph.";
obstacle_ptr->BuildLaneGraph();
ADEBUG << "Building ordered Lane Graph.";
......@@ -360,16 +356,12 @@ void ObstaclesContainer::BuildLaneGraph() {
void ObstaclesContainer::BuildJunctionFeature() {
// Go through every obstacle in the current frame, after some
// sanity checks, build junction features for those that are in junction.
for (const int id : curr_frame_predictable_obstacle_ids_) {
for (const int id : curr_frame_considered_obstacle_ids_) {
Obstacle* obstacle_ptr = GetObstacle(id);
if (obstacle_ptr == nullptr) {
AERROR << "Null obstacle found.";
continue;
}
if (obstacle_ptr->ToIgnore()) {
ADEBUG << "Ignore obstacle [" << obstacle_ptr->id() << "]";
continue;
}
const std::string& junction_id = JunctionAnalyzer::GetJunctionId();
if (obstacle_ptr->IsInJunction(junction_id)) {
ADEBUG << "Build junction feature for obstacle [" << obstacle_ptr->id()
......
......@@ -139,7 +139,7 @@ void EvaluatorManager::Run() {
}
std::vector<Obstacle*> dynamic_env;
for (int id : obstacles_container->curr_frame_predictable_obstacle_ids()) {
for (int id : obstacles_container->curr_frame_considered_obstacle_ids()) {
if (id < 0) {
ADEBUG << "The obstacle has invalid id [" << id << "].";
continue;
......@@ -149,8 +149,8 @@ void EvaluatorManager::Run() {
if (obstacle == nullptr) {
continue;
}
if (obstacle->ToIgnore() || obstacle->IsStill()) {
ADEBUG << "Ignore obstacle [" << id << "] in evaluator_manager";
if (obstacle->IsStill()) {
ADEBUG << "Ignore still obstacle [" << id << "] in evaluator_manager";
continue;
}
......
......@@ -172,6 +172,7 @@ void ObstaclesPrioritizer::AssignIgnoreLevel() {
ObstaclePriority::NORMAL);
}
}
obstacles_container->SetConsideredObstacleIds();
}
void ObstaclesPrioritizer::AssignCautionLevel() {
......
......@@ -121,7 +121,7 @@ void RightOfWay::Analyze() {
// then loop through all obstacle vehicles
for (const int id :
obstacles_container->curr_frame_predictable_obstacle_ids()) {
obstacles_container->curr_frame_considered_obstacle_ids()) {
Obstacle* obstacle_ptr = obstacles_container->GetObstacle(id);
if (obstacle_ptr == nullptr) {
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册