mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
Mac: fixed crash when discarding a signature (not moving enough) with self refenced links. Fixed link error with realsense2 library on Mac.
This commit is contained in:
@@ -293,6 +293,11 @@ IF(realsense2_FOUND)
|
||||
${LIBRARIES}
|
||||
${RealSense2_LIBRARIES}
|
||||
)
|
||||
ELSEIF(APPLE)
|
||||
SET(LIBRARIES
|
||||
${LIBRARIES}
|
||||
${realsense2_LIBRARIES}
|
||||
)
|
||||
ELSE()
|
||||
SET(LIBRARIES
|
||||
${LIBRARIES}
|
||||
|
||||
@@ -3475,11 +3475,13 @@ bool Rtabmap::process(
|
||||
_optimizedPoses.erase(lastId);
|
||||
for(std::multimap<int, Link>::iterator iter=_constraints.find(lastId); iter!=_constraints.end() && iter->first==lastId;++iter)
|
||||
{
|
||||
iter->second.to();
|
||||
std::multimap<int, Link>::iterator jter = graph::findLink(_constraints, iter->second.to(), iter->second.from(), false);
|
||||
if(jter != _constraints.end())
|
||||
if(iter->second.to() != iter->second.from())
|
||||
{
|
||||
_constraints.erase(jter);
|
||||
std::multimap<int, Link>::iterator jter = graph::findLink(_constraints, iter->second.to(), iter->second.from(), false);
|
||||
if(jter != _constraints.end())
|
||||
{
|
||||
_constraints.erase(jter);
|
||||
}
|
||||
}
|
||||
}
|
||||
_constraints.erase(lastId);
|
||||
|
||||
Reference in New Issue
Block a user