19 #include "async_grpc/rpc_handler.h" 22 #include "cartographer/cloud/proto/map_builder_service.pb.h" 26 #include "google/protobuf/empty.pb.h" 32 void AddLandmarkDataHandler::OnRequest(
33 const proto::AddLandmarkDataRequest &request) {
37 GetUnsynchronizedContext<MapBuilderContextInterface>()->EnqueueSensorData(
38 request.sensor_metadata().trajectory_id(),
45 if (GetUnsynchronizedContext<MapBuilderContextInterface>()
46 ->local_trajectory_uploader()) {
47 auto sensor_data = common::make_unique<proto::SensorData>();
48 *sensor_data->mutable_sensor_metadata() = request.sensor_metadata();
49 *sensor_data->mutable_landmark_data() = request.landmark_data();
50 GetUnsynchronizedContext<MapBuilderContextInterface>()
51 ->local_trajectory_uploader()
52 ->EnqueueSensorData(std::move(sensor_data));
56 void AddLandmarkDataHandler::OnReadsDone() {
57 Send(common::make_unique<google::protobuf::Empty>());
FixedFramePoseData FromProto(const proto::FixedFramePoseData &proto)
std::unique_ptr< Dispatchable< DataType > > MakeDispatchable(const std::string &sensor_id, const DataType &data)