#include <map_builder_server.h>
Public Member Functions | |
MapBuilderServer (const proto::MapBuilderServerOptions &map_builder_server_options, std::unique_ptr< mapping::MapBuilderInterface > map_builder) | |
void | Shutdown () final |
void | Start () final |
void | WaitForShutdown () final |
void | WaitUntilIdle () final |
~MapBuilderServer () | |
Static Public Member Functions | |
static void | RegisterMetrics (metrics::FamilyFactory *family_factory) |
Private Member Functions | |
std::map< int, LocalSlamResultHandlerSubscriptions > local_slam_subscriptions_ | GUARDED_BY (subscriptions_lock_) |
std::map< int, MapBuilderContextInterface::GlobalSlamOptimizationCallback > global_slam_subscriptions_ | GUARDED_BY (subscriptions_lock_) |
void | NotifyFinishTrajectory (int trajectory_id) |
void | OnGlobalSlamOptimizations (const std::map< int, mapping::SubmapId > &last_optimized_submap_ids, const std::map< int, mapping::NodeId > &last_optimized_node_ids) |
void | OnLocalSlamResult (int trajectory_id, const std::string client_id, common::Time time, transform::Rigid3d local_pose, sensor::RangeData range_data, std::unique_ptr< const mapping::TrajectoryBuilderInterface::InsertionResult > insertion_result) |
void | ProcessSensorDataQueue () |
void | StartSlamThread () |
int | SubscribeGlobalSlamOptimizations (MapBuilderContextInterface::GlobalSlamOptimizationCallback callback) |
MapBuilderContextInterface::LocalSlamSubscriptionId | SubscribeLocalSlamResults (int trajectory_id, MapBuilderContextInterface::LocalSlamSubscriptionCallback callback) |
void | UnsubscribeGlobalSlamOptimizations (int subscription_index) |
void | UnsubscribeLocalSlamResults (const MapBuilderContextInterface::LocalSlamSubscriptionId &subscription_id) |
Private Attributes | |
int | current_subscription_index_ = 0 |
std::unique_ptr < async_grpc::Server > | grpc_server_ |
common::BlockingQueue < std::unique_ptr < MapBuilderContextInterface::Data > > | incoming_data_queue_ |
std::unique_ptr < LocalTrajectoryUploaderInterface > | local_trajectory_uploader_ |
std::unique_ptr < mapping::MapBuilderInterface > | map_builder_ |
bool | shutting_down_ = false |
std::unique_ptr< std::thread > | slam_thread_ |
int | starting_submap_index_ = 0 |
absl::Mutex | subscriptions_lock_ |
Definition at line 78 of file map_builder_server.h.
cartographer::cloud::MapBuilderServer::MapBuilderServer | ( | const proto::MapBuilderServerOptions & | map_builder_server_options, |
std::unique_ptr< mapping::MapBuilderInterface > | map_builder | ||
) |
Definition at line 58 of file map_builder_server.cc.
Definition at line 86 of file map_builder_server.h.
std::map<int , LocalSlamResultHandlerSubscriptions> local_slam_subscriptions_ cartographer::cloud::MapBuilderServer::GUARDED_BY | ( | subscriptions_lock_ | ) | [private] |
std::map<int , MapBuilderContextInterface::GlobalSlamOptimizationCallback> global_slam_subscriptions_ cartographer::cloud::MapBuilderServer::GUARDED_BY | ( | subscriptions_lock_ | ) | [private] |
void cartographer::cloud::MapBuilderServer::NotifyFinishTrajectory | ( | int | trajectory_id | ) | [private] |
Definition at line 274 of file map_builder_server.cc.
void cartographer::cloud::MapBuilderServer::OnGlobalSlamOptimizations | ( | const std::map< int, mapping::SubmapId > & | last_optimized_submap_ids, |
const std::map< int, mapping::NodeId > & | last_optimized_node_ids | ||
) | [private] |
Definition at line 229 of file map_builder_server.cc.
void cartographer::cloud::MapBuilderServer::OnLocalSlamResult | ( | int | trajectory_id, |
const std::string | client_id, | ||
common::Time | time, | ||
transform::Rigid3d | local_pose, | ||
sensor::RangeData | range_data, | ||
std::unique_ptr< const mapping::TrajectoryBuilderInterface::InsertionResult > | insertion_result | ||
) | [private] |
Definition at line 178 of file map_builder_server.cc.
void cartographer::cloud::MapBuilderServer::ProcessSensorDataQueue | ( | ) | [private] |
Definition at line 157 of file map_builder_server.cc.
void cartographer::cloud::MapBuilderServer::RegisterMetrics | ( | metrics::FamilyFactory * | family_factory | ) | [static] |
Definition at line 289 of file map_builder_server.cc.
void cartographer::cloud::MapBuilderServer::Shutdown | ( | ) | [virtual] |
Implements cartographer::cloud::MapBuilderServerInterface.
Definition at line 144 of file map_builder_server.cc.
void cartographer::cloud::MapBuilderServer::Start | ( | ) | [virtual] |
Implements cartographer::cloud::MapBuilderServerInterface.
Definition at line 125 of file map_builder_server.cc.
void cartographer::cloud::MapBuilderServer::StartSlamThread | ( | ) | [private] |
Definition at line 170 of file map_builder_server.cc.
int cartographer::cloud::MapBuilderServer::SubscribeGlobalSlamOptimizations | ( | MapBuilderContextInterface::GlobalSlamOptimizationCallback | callback | ) | [private] |
Definition at line 261 of file map_builder_server.cc.
MapBuilderContextInterface::LocalSlamSubscriptionId cartographer::cloud::MapBuilderServer::SubscribeLocalSlamResults | ( | int | trajectory_id, |
MapBuilderContextInterface::LocalSlamSubscriptionCallback | callback | ||
) | [private] |
Definition at line 242 of file map_builder_server.cc.
void cartographer::cloud::MapBuilderServer::UnsubscribeGlobalSlamOptimizations | ( | int | subscription_index | ) | [private] |
Definition at line 268 of file map_builder_server.cc.
void cartographer::cloud::MapBuilderServer::UnsubscribeLocalSlamResults | ( | const MapBuilderContextInterface::LocalSlamSubscriptionId & | subscription_id | ) | [private] |
Definition at line 252 of file map_builder_server.cc.
void cartographer::cloud::MapBuilderServer::WaitForShutdown | ( | ) | [virtual] |
Implements cartographer::cloud::MapBuilderServerInterface.
Definition at line 134 of file map_builder_server.cc.
void cartographer::cloud::MapBuilderServer::WaitUntilIdle | ( | ) | [virtual] |
Implements cartographer::cloud::MapBuilderServerInterface.
Definition at line 284 of file map_builder_server.cc.
int cartographer::cloud::MapBuilderServer::current_subscription_index_ = 0 [private] |
Definition at line 139 of file map_builder_server.h.
std::unique_ptr<async_grpc::Server> cartographer::cloud::MapBuilderServer::grpc_server_ [private] |
Definition at line 134 of file map_builder_server.h.
common::BlockingQueue<std::unique_ptr<MapBuilderContextInterface::Data> > cartographer::cloud::MapBuilderServer::incoming_data_queue_ [private] |
Definition at line 137 of file map_builder_server.h.
std::unique_ptr<LocalTrajectoryUploaderInterface> cartographer::cloud::MapBuilderServer::local_trajectory_uploader_ [private] |
Definition at line 145 of file map_builder_server.h.
std::unique_ptr<mapping::MapBuilderInterface> cartographer::cloud::MapBuilderServer::map_builder_ [private] |
Definition at line 135 of file map_builder_server.h.
bool cartographer::cloud::MapBuilderServer::shutting_down_ = false [private] |
Definition at line 132 of file map_builder_server.h.
std::unique_ptr<std::thread> cartographer::cloud::MapBuilderServer::slam_thread_ [private] |
Definition at line 133 of file map_builder_server.h.
int cartographer::cloud::MapBuilderServer::starting_submap_index_ = 0 [private] |
Definition at line 146 of file map_builder_server.h.
absl::Mutex cartographer::cloud::MapBuilderServer::subscriptions_lock_ [private] |
Definition at line 138 of file map_builder_server.h.