2017-12-05 00:30:42 +08:00
|
|
|
// Copyright 2017 The Cartographer Authors
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
|
2017-12-19 22:11:29 +08:00
|
|
|
import "cartographer/mapping/proto/pose_graph.proto";
|
2018-01-12 20:00:25 +08:00
|
|
|
import "cartographer/mapping/proto/serialization.proto";
|
2018-01-08 20:52:14 +08:00
|
|
|
import "cartographer/mapping/proto/submap_visualization.proto";
|
2017-12-05 00:30:42 +08:00
|
|
|
import "cartographer/mapping/proto/trajectory_builder_options.proto";
|
|
|
|
import "cartographer/sensor/proto/sensor.proto";
|
2017-12-19 22:11:29 +08:00
|
|
|
import "cartographer/transform/proto/transform.proto";
|
2017-12-05 00:30:42 +08:00
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
|
|
|
|
package cartographer_grpc.proto;
|
|
|
|
|
2018-01-26 22:07:49 +08:00
|
|
|
enum SensorType {
|
|
|
|
RANGE = 0;
|
|
|
|
IMU = 1;
|
|
|
|
ODOMETRY = 2;
|
|
|
|
FIXED_FRAME_POSE = 3;
|
|
|
|
LANDMARK = 4;
|
|
|
|
LOCAL_SLAM_RESULT = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SensorId {
|
|
|
|
string id = 1;
|
|
|
|
SensorType type = 2;
|
|
|
|
}
|
|
|
|
|
2017-12-05 00:30:42 +08:00
|
|
|
message AddTrajectoryRequest {
|
2018-01-26 22:07:49 +08:00
|
|
|
repeated SensorId expected_sensor_ids = 3;
|
2017-12-05 00:30:42 +08:00
|
|
|
cartographer.mapping.proto.TrajectoryBuilderOptions
|
2017-12-05 21:46:25 +08:00
|
|
|
trajectory_builder_options = 2;
|
2017-12-05 00:30:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message SensorMetadata {
|
|
|
|
int32 trajectory_id = 1;
|
|
|
|
string sensor_id = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AddTrajectoryResponse {
|
|
|
|
int32 trajectory_id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AddOdometryDataRequest {
|
|
|
|
SensorMetadata sensor_metadata = 1;
|
|
|
|
cartographer.sensor.proto.OdometryData odometry_data = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AddImuDataRequest {
|
|
|
|
SensorMetadata sensor_metadata = 1;
|
|
|
|
cartographer.sensor.proto.ImuData imu_data = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AddRangefinderDataRequest {
|
|
|
|
SensorMetadata sensor_metadata = 1;
|
2017-12-09 02:28:47 +08:00
|
|
|
cartographer.sensor.proto.TimedPointCloudData timed_point_cloud_data = 2;
|
2017-12-05 00:30:42 +08:00
|
|
|
}
|
|
|
|
|
2017-12-15 22:26:58 +08:00
|
|
|
message AddFixedFramePoseDataRequest {
|
|
|
|
SensorMetadata sensor_metadata = 1;
|
|
|
|
cartographer.sensor.proto.FixedFramePoseData fixed_frame_pose_data = 2;
|
|
|
|
}
|
|
|
|
|
2018-01-20 00:24:30 +08:00
|
|
|
message AddLandmarkDataRequest {
|
|
|
|
SensorMetadata sensor_metadata = 1;
|
|
|
|
cartographer.sensor.proto.LandmarkData landmark_data = 2;
|
|
|
|
}
|
|
|
|
|
2017-12-05 00:30:42 +08:00
|
|
|
message FinishTrajectoryRequest {
|
|
|
|
int32 trajectory_id = 1;
|
|
|
|
}
|
|
|
|
|
2017-12-19 22:11:29 +08:00
|
|
|
message ReceiveLocalSlamResultsRequest {
|
|
|
|
int32 trajectory_id = 1;
|
|
|
|
}
|
|
|
|
|
2018-01-11 00:26:04 +08:00
|
|
|
message LocalSlamInsertionResult {
|
|
|
|
cartographer.mapping.proto.NodeId node_id = 1;
|
|
|
|
}
|
|
|
|
|
2017-12-19 22:11:29 +08:00
|
|
|
message ReceiveLocalSlamResultsResponse {
|
|
|
|
int32 trajectory_id = 1;
|
|
|
|
int64 timestamp = 2;
|
|
|
|
cartographer.transform.proto.Rigid3d local_pose = 3;
|
|
|
|
cartographer.sensor.proto.RangeData range_data = 4;
|
2018-01-11 00:26:04 +08:00
|
|
|
LocalSlamInsertionResult insertion_result = 5;
|
2017-12-19 22:11:29 +08:00
|
|
|
}
|
|
|
|
|
2018-01-08 20:52:14 +08:00
|
|
|
message GetSubmapRequest {
|
|
|
|
cartographer.mapping.proto.SubmapId submap_id = 1;
|
|
|
|
}
|
|
|
|
|
2018-02-28 03:38:57 +08:00
|
|
|
message LoadStateRequest {
|
|
|
|
oneof state_chunk {
|
2018-01-25 16:27:42 +08:00
|
|
|
cartographer.mapping.proto.PoseGraph pose_graph = 1;
|
2018-02-07 23:35:44 +08:00
|
|
|
cartographer.mapping.proto.AllTrajectoryBuilderOptions
|
|
|
|
all_trajectory_builder_options = 2;
|
|
|
|
cartographer.mapping.proto.SerializedData serialized_data = 3;
|
2018-01-25 16:27:42 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-08 20:52:14 +08:00
|
|
|
message GetSubmapResponse {
|
|
|
|
cartographer.mapping.proto.SubmapQuery.Response submap_query_response = 1;
|
|
|
|
string error_msg = 2;
|
|
|
|
}
|
|
|
|
|
2018-01-08 21:19:39 +08:00
|
|
|
message TrajectoryNodePose {
|
|
|
|
cartographer.mapping.proto.NodeId node_id = 1;
|
|
|
|
cartographer.transform.proto.Rigid3d global_pose = 2;
|
|
|
|
bool has_constant_data = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetTrajectoryNodePosesResponse {
|
|
|
|
repeated TrajectoryNodePose node_poses = 1;
|
|
|
|
}
|
|
|
|
|
2018-02-07 01:13:31 +08:00
|
|
|
message LandmarkPose {
|
|
|
|
string landmark_id = 1;
|
|
|
|
cartographer.transform.proto.Rigid3d global_pose = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetLandmarkPosesResponse {
|
|
|
|
repeated LandmarkPose landmark_poses = 1;
|
|
|
|
}
|
|
|
|
|
2018-01-08 22:34:00 +08:00
|
|
|
message SubmapPose {
|
|
|
|
cartographer.mapping.proto.SubmapId submap_id = 1;
|
|
|
|
int32 submap_version = 2;
|
|
|
|
cartographer.transform.proto.Rigid3d global_pose = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetAllSubmapPosesResponse {
|
|
|
|
repeated SubmapPose submap_poses = 1;
|
|
|
|
}
|
|
|
|
|
2018-01-08 23:28:41 +08:00
|
|
|
message GetLocalToGlobalTransformRequest {
|
|
|
|
int32 trajectory_id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetLocalToGlobalTransformResponse {
|
|
|
|
cartographer.transform.proto.Rigid3d local_to_global = 1;
|
|
|
|
}
|
|
|
|
|
2018-01-09 21:25:28 +08:00
|
|
|
message GetConstraintsResponse {
|
|
|
|
repeated cartographer.mapping.proto.PoseGraph.Constraint constraints = 1;
|
|
|
|
}
|
|
|
|
|
2018-01-12 20:00:25 +08:00
|
|
|
message AddLocalSlamResultDataRequest {
|
|
|
|
SensorMetadata sensor_metadata = 1;
|
|
|
|
cartographer.mapping.proto.LocalSlamResultData local_slam_result_data = 2;
|
|
|
|
}
|
|
|
|
|
2018-02-28 03:38:57 +08:00
|
|
|
message WriteStateResponse {
|
|
|
|
oneof state_chunk {
|
2018-02-01 18:21:50 +08:00
|
|
|
cartographer.mapping.proto.PoseGraph pose_graph = 1;
|
2018-02-07 23:35:44 +08:00
|
|
|
cartographer.mapping.proto.AllTrajectoryBuilderOptions
|
|
|
|
all_trajectory_builder_options = 2;
|
|
|
|
cartographer.mapping.proto.SerializedData serialized_data = 3;
|
2018-02-01 18:21:50 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-05 21:46:25 +08:00
|
|
|
service MapBuilderService {
|
2017-12-05 00:30:42 +08:00
|
|
|
// Starts a new trajectory and returns its index.
|
|
|
|
rpc AddTrajectory(AddTrajectoryRequest) returns (AddTrajectoryResponse);
|
|
|
|
|
|
|
|
// Adds odometry data from the sensor with id 'sensor_metadata.sensor_id' to
|
|
|
|
// the trajectory corresponding to 'sensor_metadata.trajectory_id'.
|
|
|
|
rpc AddOdometryData(stream AddOdometryDataRequest)
|
|
|
|
returns (google.protobuf.Empty);
|
|
|
|
|
2017-12-15 22:26:58 +08:00
|
|
|
// Same for IMU data.
|
2017-12-05 00:30:42 +08:00
|
|
|
rpc AddImuData(stream AddImuDataRequest) returns (google.protobuf.Empty);
|
|
|
|
|
2017-12-15 22:26:58 +08:00
|
|
|
// Same for range-finder data.
|
2017-12-05 00:30:42 +08:00
|
|
|
rpc AddRangefinderData(stream AddRangefinderDataRequest)
|
|
|
|
returns (google.protobuf.Empty);
|
|
|
|
|
2017-12-15 22:26:58 +08:00
|
|
|
// Same for fixed-frame pose data.
|
|
|
|
rpc AddFixedFramePoseData(stream AddFixedFramePoseDataRequest)
|
|
|
|
returns (google.protobuf.Empty);
|
|
|
|
|
2018-01-20 00:24:30 +08:00
|
|
|
// Same for landmark data.
|
|
|
|
rpc AddLandmarkData(stream AddLandmarkDataRequest)
|
|
|
|
returns (google.protobuf.Empty);
|
|
|
|
|
2018-01-12 20:00:25 +08:00
|
|
|
// Adds a local SLAM result.
|
|
|
|
rpc AddLocalSlamResultData(stream AddLocalSlamResultDataRequest)
|
|
|
|
returns (google.protobuf.Empty);
|
|
|
|
|
2017-12-19 22:11:29 +08:00
|
|
|
// Requests the server to send a stream of local SLAM results for the given
|
|
|
|
// 'trajectory_id'.
|
|
|
|
rpc ReceiveLocalSlamResults(ReceiveLocalSlamResultsRequest)
|
|
|
|
returns (stream ReceiveLocalSlamResultsResponse);
|
|
|
|
|
2017-12-05 00:30:42 +08:00
|
|
|
// Marks a trajectory corresponding to 'trajectory_id' as finished,
|
|
|
|
// i.e. no further sensor data is expected.
|
|
|
|
rpc FinishTrajectory(FinishTrajectoryRequest) returns (google.protobuf.Empty);
|
2018-01-08 20:52:14 +08:00
|
|
|
|
|
|
|
// Retrieves a single submap.
|
|
|
|
rpc GetSubmap(GetSubmapRequest) returns (GetSubmapResponse);
|
2018-01-08 21:19:39 +08:00
|
|
|
|
|
|
|
// Returns the current optimized trajectory poses.
|
|
|
|
rpc GetTrajectoryNodePoses(google.protobuf.Empty)
|
|
|
|
returns (GetTrajectoryNodePosesResponse);
|
2018-01-08 22:34:00 +08:00
|
|
|
|
2018-02-07 01:13:31 +08:00
|
|
|
// Returns the current optimized landmark poses.
|
|
|
|
rpc GetLandmarkPoses(google.protobuf.Empty)
|
|
|
|
returns (GetLandmarkPosesResponse);
|
|
|
|
|
2018-01-08 22:34:00 +08:00
|
|
|
// Returns the current optimized submap poses.
|
|
|
|
rpc GetAllSubmapPoses(google.protobuf.Empty)
|
|
|
|
returns (GetAllSubmapPosesResponse);
|
2018-01-08 23:28:41 +08:00
|
|
|
|
|
|
|
// Returns the current local-to-global transform for the trajectory.
|
|
|
|
rpc GetLocalToGlobalTransform(GetLocalToGlobalTransformRequest)
|
|
|
|
returns (GetLocalToGlobalTransformResponse);
|
2018-01-09 21:25:28 +08:00
|
|
|
|
|
|
|
// Returns the list of constraints in the current optimization problem.
|
|
|
|
rpc GetConstraints(google.protobuf.Empty) returns (GetConstraintsResponse);
|
2018-01-25 16:27:42 +08:00
|
|
|
|
2018-01-26 00:31:03 +08:00
|
|
|
// Requests a PoseGraph to call RunFinalOptimization.
|
|
|
|
rpc RunFinalOptimization(google.protobuf.Empty)
|
|
|
|
returns (google.protobuf.Empty);
|
|
|
|
|
2018-02-28 03:38:57 +08:00
|
|
|
// Adds serialized SLAM state data in the order defined by ProtoStreamReader.
|
|
|
|
rpc LoadState(stream LoadStateRequest) returns (google.protobuf.Empty);
|
2018-02-01 18:21:50 +08:00
|
|
|
|
2018-02-28 03:38:57 +08:00
|
|
|
// Receives serialized SLAM state data in the order defined by
|
|
|
|
// ProtoStreamWriter.
|
|
|
|
rpc WriteState(google.protobuf.Empty) returns (stream WriteStateResponse);
|
2017-12-05 00:30:42 +08:00
|
|
|
}
|