[GenericPoseGraph] Add protos for nodes/constraints. (#1258)
Does not cover all constraints yet.master
parent
9f1039221c
commit
288328ef14
|
@ -0,0 +1,26 @@
|
|||
// Copyright 2018 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";
|
||||
|
||||
import "cartographer/pose_graph/proto/loss_function.proto";
|
||||
import "cartographer/pose_graph/proto/cost_function.proto";
|
||||
|
||||
package cartographer.pose_graph.proto;
|
||||
|
||||
message Constraint {
|
||||
string id = 1;
|
||||
CostFunction cost_function = 2;
|
||||
LossFunction loss_function = 3;
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
// Copyright 2018 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";
|
||||
|
||||
import "cartographer/pose_graph/proto/node.proto";
|
||||
import "cartographer/transform/proto/transform.proto";
|
||||
|
||||
package cartographer.pose_graph.proto;
|
||||
|
||||
message RelativePose2D {
|
||||
NodeId first = 1;
|
||||
NodeId second = 2;
|
||||
|
||||
transform.proto.Rigid2d first_T_second = 3;
|
||||
double translation_weight = 4;
|
||||
double rotation_weight = 5;
|
||||
}
|
||||
|
||||
message RelativePose3D {
|
||||
NodeId first = 1;
|
||||
NodeId second = 2;
|
||||
|
||||
transform.proto.Rigid3d first_T_second = 3;
|
||||
double translation_weight = 4;
|
||||
double rotation_weight = 5;
|
||||
}
|
||||
|
||||
message Acceleration3D {
|
||||
NodeId first = 1;
|
||||
NodeId second = 2;
|
||||
NodeId third = 3;
|
||||
NodeId imu_calibration = 4;
|
||||
|
||||
transform.proto.Vector3d delta_velocity_imu_frame = 5;
|
||||
int64 first_to_second_time_delta = 6;
|
||||
int64 second_to_third_time_delta = 7;
|
||||
double scaling_factor = 8;
|
||||
}
|
||||
|
||||
message Rotation3D {
|
||||
NodeId first = 1;
|
||||
NodeId second = 2;
|
||||
NodeId imu_calibration = 3;
|
||||
|
||||
transform.proto.Quaterniond delta_rotation_imu_frame = 4;
|
||||
double scaling_factor = 5;
|
||||
}
|
||||
|
||||
message CostFunction {
|
||||
oneof Type {
|
||||
RelativePose2D relative_pose_2d = 1;
|
||||
RelativePose3D relative_pose_3d = 2;
|
||||
Acceleration3D acceleration_3d = 3;
|
||||
Rotation3D rotation_3d = 4;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright 2018 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";
|
||||
|
||||
package cartographer.pose_graph.proto;
|
||||
|
||||
message QuadraticLoss {}
|
||||
|
||||
message HuberLoss {
|
||||
double scale = 1;
|
||||
}
|
||||
|
||||
message LossFunction {
|
||||
oneof Type {
|
||||
QuadraticLoss quadratic_loss = 1;
|
||||
HuberLoss huber_loss = 2;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
// Copyright 2018 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";
|
||||
|
||||
package cartographer.pose_graph.proto;
|
||||
|
||||
import "cartographer/transform/proto/transform.proto";
|
||||
|
||||
enum Parameterization {
|
||||
NONE = 0;
|
||||
YAW_ONLY = 1;
|
||||
YAW_CONSTANT = 2;
|
||||
}
|
||||
|
||||
message Pose2D {
|
||||
transform.proto.Vector2d translation = 1;
|
||||
double rotation = 2;
|
||||
}
|
||||
|
||||
message Pose3D {
|
||||
transform.proto.Vector3d translation = 1;
|
||||
transform.proto.Quaterniond rotation = 2;
|
||||
Parameterization translation_parameterization = 3;
|
||||
Parameterization rotation_parameterization = 4;
|
||||
}
|
||||
|
||||
message ImuCalibration {
|
||||
double gravity_constant = 1;
|
||||
transform.proto.Quaterniond imu_calibration = 2;
|
||||
Parameterization rotation_parameterization = 3;
|
||||
}
|
||||
|
||||
message NodeId {
|
||||
string object_id = 1;
|
||||
int64 timestamp = 2;
|
||||
}
|
||||
|
||||
message Parameters {
|
||||
oneof Type {
|
||||
Pose2D pose_2d = 1;
|
||||
Pose3D pose_3d = 2;
|
||||
ImuCalibration imu_calibration = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message Node {
|
||||
NodeId id = 1;
|
||||
bool constant = 2;
|
||||
Parameters parameters = 3;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2018 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";
|
||||
|
||||
import "cartographer/pose_graph/proto/node.proto";
|
||||
import "cartographer/pose_graph/proto/constraint.proto";
|
||||
|
||||
package cartographer.pose_graph.proto;
|
||||
|
||||
message PoseGraphData {
|
||||
repeated Node nodes = 1;
|
||||
repeated Constraint constraints = 2;
|
||||
}
|
Loading…
Reference in New Issue