parent
b383f18365
commit
57d53b6d53
|
@ -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
|
||||
|
|
|
@ -84,12 +84,6 @@ class ConnectedComponents {
|
|||
proto::ConnectedComponents ToProto(
|
||||
std::vector<std::vector<int>> 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
|
||||
|
||||
|
|
Loading…
Reference in New Issue