Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "cartographer/cloud/internal/handlers/set_landmark_pose_handler.h"
00018
00019 #include "async_grpc/rpc_handler.h"
00020 #include "cartographer/cloud/internal/map_builder_context_interface.h"
00021 #include "cartographer/cloud/proto/map_builder_service.pb.h"
00022 #include "cartographer/transform/transform.h"
00023 #include "google/protobuf/empty.pb.h"
00024
00025 namespace cartographer {
00026 namespace cloud {
00027 namespace handlers {
00028
00029 void SetLandmarkPoseHandler::OnRequest(
00030 const proto::SetLandmarkPoseRequest& request) {
00031 GetContext<MapBuilderContextInterface>()
00032 ->map_builder()
00033 .pose_graph()
00034 ->SetLandmarkPose(
00035 request.landmark_pose().landmark_id(),
00036 transform::ToRigid3(request.landmark_pose().global_pose()));
00037 Send(absl::make_unique<google::protobuf::Empty>());
00038 }
00039
00040 }
00041 }
00042 }