19 #include "async_grpc/rpc_handler.h" 21 #include "cartographer/cloud/proto/map_builder_service.pb.h" 23 #include "google/protobuf/empty.pb.h" 29 void GetSubmapHandler::OnRequest(
const proto::GetSubmapRequest &request) {
30 auto response = common::make_unique<proto::GetSubmapResponse>();
31 response->set_error_msg(
32 GetContext<MapBuilderContextInterface>()->map_builder().SubmapToProto(
33 mapping::SubmapId{request.submap_id().trajectory_id(),
34 request.submap_id().submap_index()},
35 response->mutable_submap_query_response()));
36 Send(std::move(response));