A gRPC-powered routing service with A* shortest path algorithm, which implements the following gRPC service:
service RoutingService {
// 获取导航路线
// Get routing path
rpc GetRoute(GetRouteRequest) returns (GetRouteResponse);
// 设置行车导航道路通行成本
// Set traveling cost of driving routing
rpc SetDrivingCosts(SetDrivingCostsRequest) returns (SetDrivingCostsResponse);
// 获取行车导航道路通行成本
// Get traveling cost of driving routing
rpc GetDrivingCosts(GetDrivingCostsRequest) returns (GetDrivingCostsResponse);
}
./routing -h
-benchmark
benchmark mode
-benchmark.aoi_id_end int
the end aoi id for benchmark (default 500010000)
-benchmark.aoi_id_start int
the start aoi id for benchmark (default 500000000)
-benchmark.count int
the random routing count for benchmark (default 1000)
-benchmark.cpu int
the cpu count for benchmark (default 1)
-benchmark.seed int
the seed for benchmark
-cache string
input cache dir path (empty means disable cache)
-listen string
gRPC listening address (default "localhost:52101")
-log-level string
log level [debug, info, warn, error, fatal, panic] (default "info")
-map string
map file path or database and collection [format: {fspath} or {db}.{col}]
-mongo_uri string
mongo db uri
-pprof string
pprof listening address (default "localhost:52102")
-road-statuses string
roadstatuses database and collection, can be empty [format: {fspath} or {db}.{col}]
Simplest way to run:
./routing -map ./map.pb
./map.pb
is the map file generated bymosstool
.
Windows Defender may block the execution of the program. You can unblock it by following the steps below:
- Open Windows Security
- Click on Virus & threat protection
- Click on Protection history
- Click on the "Allow" button for the blocked program