| 50 | } |
| 51 | |
| 52 | std::string data_serializer::serialize_map_diff() |
| 53 | { |
| 54 | std::vector<PLPSLAM::data::keyframe *> keyframes; |
| 55 | map_publisher_->get_keyframes(keyframes); |
| 56 | |
| 57 | std::vector<PLPSLAM::data::landmark *> all_landmarks; |
| 58 | std::set<PLPSLAM::data::landmark *> local_landmarks; |
| 59 | map_publisher_->get_landmarks(all_landmarks, local_landmarks); |
| 60 | |
| 61 | const auto current_camera_pose = map_publisher_->get_current_cam_pose(); |
| 62 | |
| 63 | const double pose_hash = get_mat_hash(current_camera_pose); |
| 64 | if (pose_hash == current_pose_hash_) |
| 65 | { |
| 66 | current_pose_hash_ = pose_hash; |
| 67 | return ""; |
| 68 | } |
| 69 | current_pose_hash_ = pose_hash; |
| 70 | |
| 71 | return serialize_as_protobuf(keyframes, all_landmarks, local_landmarks, current_camera_pose); |
| 72 | } |
| 73 | |
| 74 | std::string data_serializer::serialize_latest_frame(const unsigned int image_quality) |
| 75 | { |
no test coverage detected