rename getUniqueKey
parent
b42d3a3d2f
commit
c1a7cf21d5
|
@ -93,7 +93,8 @@ void TranslationRecovery::addPrior(
|
||||||
|
|
||||||
// Add between factors for optional relative translations.
|
// Add between factors for optional relative translations.
|
||||||
for (auto edge : betweenTranslations) {
|
for (auto edge : betweenTranslations) {
|
||||||
Key k1 = getUniqueKey(edge.key1()), k2 = getUniqueKey(edge.key2());
|
Key k1 = getSameTranslationRootNode(edge.key1()),
|
||||||
|
k2 = getSameTranslationRootNode(edge.key2());
|
||||||
if (k1 != k2) {
|
if (k1 != k2) {
|
||||||
graph->emplace_shared<BetweenFactor<Point3>>(k1, k2, edge.measured(),
|
graph->emplace_shared<BetweenFactor<Point3>>(k1, k2, edge.measured(),
|
||||||
edge.noiseModel());
|
edge.noiseModel());
|
||||||
|
@ -107,7 +108,7 @@ void TranslationRecovery::addPrior(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Key TranslationRecovery::getUniqueKey(const Key i) const {
|
Key TranslationRecovery::getSameTranslationRootNode(const Key i) const {
|
||||||
for (const auto &optimizedAndDuplicateKeys : sameTranslationNodes_) {
|
for (const auto &optimizedAndDuplicateKeys : sameTranslationNodes_) {
|
||||||
Key optimizedKey = optimizedAndDuplicateKeys.first;
|
Key optimizedKey = optimizedAndDuplicateKeys.first;
|
||||||
std::set<Key> duplicateKeys = optimizedAndDuplicateKeys.second;
|
std::set<Key> duplicateKeys = optimizedAndDuplicateKeys.second;
|
||||||
|
|
|
@ -153,7 +153,7 @@ class TranslationRecovery {
|
||||||
* @return Key of optimized variable - same as input if it does not have any
|
* @return Key of optimized variable - same as input if it does not have any
|
||||||
* zero-translation edges.
|
* zero-translation edges.
|
||||||
*/
|
*/
|
||||||
Key getUniqueKey(const Key i) const;
|
Key getSameTranslationRootNode(const Key i) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Adds nodes that were not optimized for because they were connected
|
* @brief Adds nodes that were not optimized for because they were connected
|
||||||
|
|
Loading…
Reference in New Issue