Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions include/hydra/frontend/mesh_delta_clustering.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ std::string printLabels(const LabelSet& labels);

LabelIndices getLabelIndices(const LabelSet& desired_labels,
const kimera_pgmo::MeshDelta& delta,
const std::unordered_set<size_t>* invalid = nullptr,
bool instance_id = false);
const std::unordered_set<size_t>* invalid = nullptr);

Clusters findClusters(const ClusteringConfig& config,
const kimera_pgmo::MeshDelta& delta,
Expand Down
1 change: 0 additions & 1 deletion include/hydra/frontend/surface_place_extractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class SurfacePlaceExtractor {
double place_overlap_threshold = 0.1;
double place_max_neighbor_z_diff = 0.5;
double connection_ellipse_scale_factor = 1;
bool instance_id = false;
std::vector<Sink::Factory> sinks;
} const config;

Expand Down
9 changes: 2 additions & 7 deletions src/frontend/mesh_delta_clustering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ std::string printLabels(const std::set<uint32_t>& labels) {

LabelIndices getLabelIndices(const std::set<uint32_t>& desired_labels,
const kimera_pgmo::MeshDelta& delta,
const std::unordered_set<size_t>* invalid,
bool instance_id) {
const std::unordered_set<size_t>* invalid) {
LabelIndices label_indices;
if (!kimera_pgmo::traits::get_vertex_properties(delta).has_label) {
LOG(WARNING) << "[Delta Clustering] Mesh missing labels!";
Expand All @@ -54,11 +53,7 @@ LabelIndices getLabelIndices(const std::set<uint32_t>& desired_labels,
}

const auto& v = delta.getVertex(i);
const auto raw_label = v.traits.label;
const auto label = (instance_id && raw_label > 0xFFFF)
? static_cast<uint32_t>(raw_label >> 16)
: raw_label;

const auto label = v.traits.label;
seen_labels.insert(label);
if (!desired_labels.count(label)) {
continue;
Expand Down
4 changes: 1 addition & 3 deletions src/frontend/surface_place_extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ void declare_config(SurfacePlaceExtractor::Config& config) {
field(config.place_overlap_threshold, "place_overlap_threshold");
field(config.place_max_neighbor_z_diff, "place_max_neighbor_z_diff");
field(config.connection_ellipse_scale_factor, "connection_ellipse_scale_factor");
field(config.instance_id, "instance_id");
field(config.sinks, "sinks");
}

Expand All @@ -143,8 +142,7 @@ void SurfacePlaceExtractor::detect(const ActiveWindowOutput& msg,
MLOG(2) << "n original active indices: " << delta.getNumActiveVertices();
const auto frozen =
getFrozenSet(config, msg.timestamp_ns, offsets, active_places_, to_remove_);
const auto label_indices =
clustering::getLabelIndices(labels_, delta, &frozen, config.instance_id);
const auto label_indices = clustering::getLabelIndices(labels_, delta, &frozen);
if (label_indices.empty()) {
MLOG(2) << "no vertices found matching desired labels";
return;
Expand Down