mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-08 12:30:20 +08:00
DbViewer: Updated add constraint order (from=old, to=newer)
This commit is contained in:
@@ -7088,7 +7088,7 @@ bool DatabaseViewer::addConstraint(int from, int to, bool silent)
|
||||
UWARN("Cannot add link to same node");
|
||||
return false;
|
||||
}
|
||||
else if(from < to)
|
||||
else if(from > to)
|
||||
{
|
||||
switchedIds = true;
|
||||
int tmp = from;
|
||||
@@ -7398,6 +7398,10 @@ bool DatabaseViewer::addConstraint(int from, int to, bool silent)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(newLink.from() < newLink.to())
|
||||
{
|
||||
newLink = newLink.inverse();
|
||||
}
|
||||
linksAdded_.insert(std::make_pair(newLink.from(), newLink));
|
||||
}
|
||||
if(!silent)
|
||||
|
||||
Reference in New Issue
Block a user