提交 977ebe5d 编写于 作者: S siyangy 提交者: Dong Li

Dreamview: check point x,y (#1017)

上级 58a3cae7
......@@ -124,7 +124,7 @@ SimulationWorldUpdater::SimulationWorldUpdater(WebSocketHandler *websocket,
Json poi_list = Json::array();
if (LoadPOI()) {
for (const auto& landmark : poi_.landmark()) {
for (const auto &landmark : poi_.landmark()) {
Json place;
place["name"] = landmark.name();
place["x"] = landmark.waypoint().pose().x();
......@@ -176,6 +176,11 @@ bool SimulationWorldUpdater::ConstructRoutingRequest(
auto *waypoint = routing_request->mutable_waypoint();
for (size_t i = 0; i < iter->size(); ++i) {
auto &point = (*iter)[i];
if (point.find("x") == point.end() || point.find("y") == point.end()) {
AERROR << "Failed to prepare a routing request: waypoint not found";
return false;
}
if (!map_service_->ConstructLaneWayPoint(point["x"], point["y"],
waypoint->Add())) {
waypoint->RemoveLast();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册