19 #include "async_grpc/rpc_handler.h" 21 #include "cartographer/cloud/proto/map_builder_service.pb.h" 24 #include "google/protobuf/empty.pb.h" 30 void GetLandmarkPosesHandler::OnRequest(
31 const google::protobuf::Empty& request) {
32 auto landmark_poses = GetContext<MapBuilderContextInterface>()
36 auto response = common::make_unique<proto::GetLandmarkPosesResponse>();
37 for (
const auto& landmark_pose : landmark_poses) {
38 auto* landmark = response->add_landmark_poses();
39 landmark->set_landmark_id(landmark_pose.first);
42 Send(std::move(response));