Apollo 10.0
自动驾驶开放平台
worker_agent.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2019 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
17
18#include <memory>
19
20#include "grpc++/grpc++.h"
21
22namespace apollo {
23namespace hdmap {
24
26 sp_conf_ = ParseJson(FLAGS_conf_json);
27 assert(sp_conf_ != nullptr);
28 sp_pose_collection_agent_ = std::make_shared<PoseCollectionAgent>(sp_conf_);
29 sp_channel_checker_agent_ = std::make_shared<ChannelVerifyAgent>(sp_conf_);
30
31 sp_static_align_agent_ = std::make_shared<STATIC_ALIGN_AGENT_TYPE>(
32 sp_conf_, sp_pose_collection_agent_);
33 sp_eight_route_agent_ = std::make_shared<EIGHT_ROUTE_AGENT_TYPE>(
34 sp_conf_, sp_pose_collection_agent_);
35 sp_loops_verify_agent_ =
36 std::make_shared<LoopsVerifyAgent>(sp_conf_, sp_pose_collection_agent_);
37 AINFO << "MapDataCheckerAgent create successfully";
38}
39
40std::shared_ptr<PoseCollectionAgent>
42 return sp_pose_collection_agent_;
43}
44
46 grpc::ServerContext *context, ChannelVerifyRequest *request,
47 ChannelVerifyResponse *response) {
48 return sp_channel_checker_agent_->ProcessGrpcRequest(context, request,
49 response);
50}
51
53 grpc::ServerContext *context, StaticAlignRequest *request,
54 StaticAlignResponse *response) {
55 return sp_static_align_agent_->ProcessGrpcRequest(context, request, response);
56}
57
59 grpc::ServerContext *context, EightRouteRequest *request,
60 EightRouteResponse *response) {
61 return sp_eight_route_agent_->ProcessGrpcRequest(context, request, response);
62}
63
65 grpc::ServerContext *context, LoopsVerifyRequest *request,
66 LoopsVerifyResponse *response) {
67 return sp_loops_verify_agent_->ProcessGrpcRequest(context, request, response);
68}
69
70} // namespace hdmap
71} // namespace apollo
std::shared_ptr< PoseCollectionAgent > GetSpPoseCollectionAgent()
grpc::Status ServiceEightRoute(grpc::ServerContext *context, EightRouteRequest *request, EightRouteResponse *response)
grpc::Status ServiceLoopsVerify(grpc::ServerContext *context, LoopsVerifyRequest *request, LoopsVerifyResponse *response)
grpc::Status ServiceChannelVerify(grpc::ServerContext *context, ChannelVerifyRequest *request, ChannelVerifyResponse *response)
grpc::Status ServiceStaticAlign(grpc::ServerContext *context, StaticAlignRequest *request, StaticAlignResponse *response)
#define AINFO
Definition log.h:42
std::shared_ptr< JsonConf > ParseJson(std::string conf_path)
Definition common.cc:23
class register implement
Definition arena_queue.h:37