Alexander Belyaev 2018-02-07 10:47:39 +01:00 committed by Wally B. Feed
parent 7762087edf
commit 95dbcfdf9e
2 changed files with 13 additions and 0 deletions

View File

@ -154,6 +154,13 @@ proto::PoseGraph PoseGraph::ToProto() {
*proto.add_constraint() = cartographer::mapping::ToProto(constraint);
}
auto landmarks_copy = GetLandmarkPoses();
proto.mutable_landmarks()->Reserve(landmarks_copy.size());
for (const auto& id_pose : landmarks_copy) {
auto* landmark_proto = proto.add_landmarks();
landmark_proto->set_landmark_id(id_pose.first);
*landmark_proto->mutable_global_pose() = transform::ToProto(id_pose.second);
}
return proto;
}

View File

@ -51,6 +51,12 @@ message PoseGraph {
Tag tag = 5;
}
message Landmark {
string landmark_id = 1;
transform.proto.Rigid3d global_pose = 2;
}
repeated Constraint constraint = 2;
repeated Trajectory trajectory = 4;
repeated Landmark landmarks = 5;
}