提交 e14c23ca 编写于 作者: D Dong Li 提交者: lianglia-apollo

planning: temporarily disable thread feature to help debug

上级 c550cdc7
......@@ -161,6 +161,7 @@ const std::vector<ReferenceLineInfo> &Frame::reference_line_info() const {
}
const Obstacle *Frame::FindObstacle(const std::string &obstacle_id) {
std::lock_guard<std::mutex> lock(obstacles_mutex_);
return obstacles_.Find(obstacle_id);
}
......
......@@ -246,20 +246,11 @@ common::Status Planning::Plan(const bool is_on_auto_mode,
->CopyFrom(stitching_trajectory.back());
}
std::vector<std::unique_ptr<std::thread>> threads;
for (auto& reference_line_info : frame_->reference_line_info()) {
threads.emplace_back(
new std::thread([this, stitching_trajectory, &reference_line_info] {
auto status = this->planner_->Plan(
stitching_trajectory.back(), frame_.get(), &reference_line_info);
if (!status.ok()) {
AERROR << "planner failed to make a driving plan.";
}
}));
}
for (const auto& thread : threads) {
if (thread->joinable()) {
thread->join();
auto status = this->planner_->Plan(stitching_trajectory.back(),
frame_.get(), &reference_line_info);
if (!status.ok()) {
AERROR << "planner failed to make a driving plan.";
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册