cartographer_ros
cartographer_grpc
offline_node_grpc_main.cc
Go to the documentation of this file.
1
/*
2
* Copyright 2018 The Cartographer Authors
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#include "
cartographer/cloud/client/map_builder_stub.h
"
18
#include "
cartographer_ros/offline_node.h
"
19
#include "
cartographer_ros/ros_log_sink.h
"
20
#include "gflags/gflags.h"
21
#include "
ros/ros.h
"
22
23
DEFINE_string
(server_address,
"localhost:50051"
,
24
"gRPC server address to "
25
"stream the sensor data to."
);
26
27
int
main
(
int
argc,
char
** argv) {
28
google::InitGoogleLogging(argv[0]);
29
google::ParseCommandLineFlags(&argc, &argv,
true
);
30
31
::ros::init(argc, argv,
"cartographer_grpc_offline_node"
);
32
::ros::start();
33
34
cartographer_ros::ScopedRosLogSink
ros_log_sink;
35
36
const
cartographer_ros::MapBuilderFactory
map_builder_factory =
37
[](const ::cartographer::mapping::proto::MapBuilderOptions&) {
38
return ::cartographer::common::make_unique<
39
::cartographer::cloud::MapBuilderStub
>(FLAGS_server_address);
40
};
41
42
cartographer_ros::RunOfflineNode
(map_builder_factory);
43
44
::ros::shutdown();
45
}
offline_node.h
cartographer_ros::RunOfflineNode
void RunOfflineNode(const MapBuilderFactory &map_builder_factory)
Definition:
offline_node.cc:79
cartographer_ros::MapBuilderFactory
std::function< std::unique_ptr<::cartographer::mapping::MapBuilderInterface >(const ::cartographer::mapping::proto::MapBuilderOptions &)> MapBuilderFactory
Definition:
offline_node.h:32
map_builder_stub.h
cartographer::cloud::MapBuilderStub
main
int main(int argc, char **argv)
Definition:
offline_node_grpc_main.cc:27
ros_log_sink.h
cartographer_ros::ScopedRosLogSink
Definition:
ros_log_sink.h:28
ros.h
DEFINE_string
DEFINE_string(server_address, "localhost:50051", "gRPC server address to " "stream the sensor data to.")
cartographer_ros
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:06:05