diff --git a/cartographer/mapping/connected_components.cc b/cartographer/mapping/connected_components.cc index 1761e3b..4290908 100644 --- a/cartographer/mapping/connected_components.cc +++ b/cartographer/mapping/connected_components.cc @@ -126,22 +126,5 @@ proto::ConnectedComponents ToProto( return proto; } -proto::ConnectedComponents::ConnectedComponent FindConnectedComponent( - const proto::ConnectedComponents& connected_components, - const int trajectory_id) { - for (const auto& connected_component : - connected_components.connected_component()) { - if (std::find(connected_component.trajectory_id().begin(), - connected_component.trajectory_id().end(), - trajectory_id) != connected_component.trajectory_id().end()) { - return connected_component; - } - } - - proto::ConnectedComponents::ConnectedComponent connected_component; - connected_component.add_trajectory_id(trajectory_id); - return connected_component; -} - } // namespace mapping } // namespace cartographer diff --git a/cartographer/mapping/connected_components.h b/cartographer/mapping/connected_components.h index dbf3e8a..6899e80 100644 --- a/cartographer/mapping/connected_components.h +++ b/cartographer/mapping/connected_components.h @@ -84,12 +84,6 @@ class ConnectedComponents { proto::ConnectedComponents ToProto( std::vector> connected_components); -// Returns the connected component containing 'trajectory_id'. -proto::ConnectedComponents::ConnectedComponent FindConnectedComponent( - const cartographer::mapping::proto::ConnectedComponents& - connected_components, - int trajectory_id); - } // namespace mapping } // namespace cartographer