17 #ifndef CARTOGRAPHER_INTERNAL_CLOUD_MAP_BUILDER_CONTEXT_IMPL_H 18 #define CARTOGRAPHER_INTERNAL_CLOUD_MAP_BUILDER_CONTEXT_IMPL_H 23 template <
class SubmapType>
26 : map_builder_server_(map_builder_server) {}
28 template <
class SubmapType>
33 template <
class SubmapType>
39 template <
class SubmapType>
43 return [map_builder_server](
50 std::move(range_data),
51 std::move(insertion_result));
55 template <
class SubmapType>
57 const Data& sensor_data) {
58 sensor_data.
data->AddToTrajectoryBuilder(
63 template <
class SubmapType>
71 template <
class SubmapType>
77 template <
class SubmapType>
83 template <
class SubmapType>
85 int subscription_index) {
89 template <
class SubmapType>
94 template <
class SubmapType>
100 template <
class SubmapType>
102 int trajectory_id, std::unique_ptr<sensor::Data> data) {
104 common::make_unique<Data>(
Data{trajectory_id, std::move(data)}));
109 int trajectory_id,
const std::string& sensor_id,
110 const mapping::proto::LocalSlamResultData& local_slam_result_data);
113 int trajectory_id,
const std::string& sensor_id,
114 const mapping::proto::LocalSlamResultData& local_slam_result_data);
119 #endif // CARTOGRAPHER_INTERNAL_CLOUD_MAP_BUILDER_CONTEXT_IMPL_H
mapping::TrajectoryBuilderInterface::LocalSlamResultCallback GetLocalSlamResultCallbackForSubscriptions() override
void AddSensorDataToTrajectory(const Data &sensor_data) override
std::unique_ptr< mapping::MapBuilderInterface > map_builder_
void UnsubscribeGlobalSlamOptimizations(int subscription_index) override
MapBuilderContextInterface::LocalSlamSubscriptionId SubscribeLocalSlamResults(int trajectory_id, MapBuilderContextInterface::LocalSlamSubscriptionCallback callback)
void NotifyFinishTrajectory(int trajectory_id) override
std::function< bool(std::unique_ptr< LocalSlamResult >)> LocalSlamSubscriptionCallback
void NotifyFinishTrajectory(int trajectory_id)
std::function< bool(const std::map< int, mapping::SubmapId > &, const std::map< int, mapping::NodeId > &)> GlobalSlamOptimizationCallback
MapBuilderContextInterface::LocalSlamSubscriptionId SubscribeLocalSlamResults(int trajectory_id, LocalSlamSubscriptionCallback callback) override
std::unique_ptr< sensor::Data > data
UniversalTimeScaleClock::time_point Time
void OnLocalSlamResult(int trajectory_id, common::Time time, transform::Rigid3d local_pose, sensor::RangeData range_data, std::unique_ptr< const mapping::TrajectoryBuilderInterface::InsertionResult > insertion_result)
std::unique_ptr< LocalTrajectoryUploaderInterface > local_trajectory_uploader_
mapping::MapBuilderInterface & map_builder() override
MapBuilderContext(MapBuilderServer *map_builder_server)
int SubscribeGlobalSlamOptimizations(MapBuilderContextInterface::GlobalSlamOptimizationCallback callback)
common::BlockingQueue< std::unique_ptr< MapBuilderContextInterface::Data > > & sensor_data_queue() override
LocalTrajectoryUploaderInterface * local_trajectory_uploader() override
void EnqueueSensorData(int trajectory_id, std::unique_ptr< sensor::Data > data) override
void UnsubscribeLocalSlamResults(const LocalSlamSubscriptionId &subscription_id) override
void UnsubscribeLocalSlamResults(const MapBuilderContextInterface::LocalSlamSubscriptionId &subscription_id)
common::BlockingQueue< std::unique_ptr< MapBuilderContextInterface::Data > > incoming_data_queue_
int SubscribeGlobalSlamOptimizations(GlobalSlamOptimizationCallback callback) override
void UnsubscribeGlobalSlamOptimizations(int subscription_index)
MapBuilderServer * map_builder_server_
void EnqueueLocalSlamResultData(int trajectory_id, const std::string &sensor_id, const mapping::proto::LocalSlamResultData &local_slam_result_data) override
std::function< void(int, common::Time, transform::Rigid3d, sensor::RangeData, std::unique_ptr< const InsertionResult >)> LocalSlamResultCallback