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 AddImuDataHandler::OnRequest(
const proto::AddImuDataRequest &request) {
36 GetUnsynchronizedContext<MapBuilderContextInterface>()->EnqueueSensorData(
37 request.sensor_metadata().trajectory_id(),
44 if (GetUnsynchronizedContext<MapBuilderContextInterface>()
45 ->local_trajectory_uploader()) {
46 auto sensor_data = common::make_unique<proto::SensorData>();
47 *sensor_data->mutable_sensor_metadata() = request.sensor_metadata();
48 *sensor_data->mutable_imu_data() = request.imu_data();
49 GetUnsynchronizedContext<MapBuilderContextInterface>()
50 ->local_trajectory_uploader()
51 ->EnqueueSensorData(std::move(sensor_data));
55 void AddImuDataHandler::OnReadsDone() {
56 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)