ApolloAuto/apollo

path_bounds_decider的障碍物决策问题

Bekasas opened this issue · 2 comments

Apollo 6.0,master版本。

问题

在path_bounds_decider的GetBoundaryFromStaticObstacles中,会根据障碍物设置路径边界。

但是在实际的代码中,遇到了一些问题:
程序只会选择从离障碍物较远的一侧通过。不会尝试借道并从障碍物的另一侧通过。
从注释中看,如果阻塞了,是会尝试从另一侧通过的,但是代码中却没有这个逻辑。

具体的代码见下面:

在这里定义了2个Map:

obs_id_to_direction表示选择了从障碍物左侧还是右侧通过
obs_id_to_sidepass_decision表示是否允许side-pass,可是程序中并未使用这个Map

  // Maps obstacle ID's to the decided ADC pass direction, if ADC should
  // pass from left, then true; otherwise, false.
  std::unordered_map<std::string, bool> obs_id_to_direction;
  // Maps obstacle ID's to the decision of whether side-pass on this obstacle
  // is allowed. If allowed, then true; otherwise, false.
  std::unordered_map<std::string, bool> obs_id_to_sidepass_decision;

障碍物决策

代码的意思是根据障碍物在车道左侧还是右侧,选择距离大的一侧通过。
但是注释中提到的side-pass,代码中却未体现

 // A new obstacle enters into our scope:
          //   - Decide which direction for the ADC to pass.
          //   - Update the left/right bound accordingly.
          //   - If boundaries blocked, then decide whether can side-pass.
          //   - If yes, then borrow neighbor lane to side-pass.
          if (curr_obstacle_l_min + curr_obstacle_l_max < center_line * 2) {
            // Obstacle is to the right of center-line, should pass from left.
            obs_id_to_direction[curr_obstacle_id] = true;
            right_bounds.insert(curr_obstacle_l_max);
          } else {
            // Obstacle is to the left of center-line, should pass from right.
            obs_id_to_direction[curr_obstacle_id] = false;
            left_bounds.insert(curr_obstacle_l_min);
          }

程序只会选择从离障碍物较远的一侧通过。不会尝试借道并从障碍物的另一侧通过。

建议首先查看一下障碍物位置处车道线是否为虚线?

Closed due to inactivity. If the problem persists, pls feel free to reopen it or create a new one and refer to it.