提交 82383f07 编写于 作者: S siyangy 提交者: GitHub

Dreamview: simplify end point (#662)

上级 52ab672c
......@@ -161,18 +161,13 @@ bool SimulationWorldUpdater::ConstructRoutingRequest(
}
// set end point
auto *endLane = routing_request->add_waypoint();
auto *end_point = routing_request->add_waypoint();
if (json["sendDefaultRoute"]) {
// Try to reload end point if it hasn't been loaded yet.
if (!LoadDefaultEndPoint()) {
return false;
}
endLane->set_id(default_end_point_.id());
endLane->set_s(default_end_point_.s());
auto *pose = endLane->mutable_pose();
pose->set_x(default_end_point_.pose().x());
pose->set_y(default_end_point_.pose().y());
end_point->CopyFrom(default_end_point_);
} else {
if (json.find("end") == json.end()) {
AERROR << "Failed to prepare a routing request: end point not found";
......@@ -184,7 +179,7 @@ bool SimulationWorldUpdater::ConstructRoutingRequest(
AERROR << "Failed to prepare a routing request: end point not found";
return false;
}
map_service_->ConstructLaneWayPoint(end["x"], end["y"], endLane);
map_service_->ConstructLaneWayPoint(end["x"], end["y"], end_point);
}
AINFO << "Constructed RoutingRequest to be sent, waypoints: "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册