Output an error if a timestamp file is missing instead of asserting #613

This commit is contained in:
matlabbe
2020-10-12 14:30:57 -04:00
parent 1b4a992b55
commit 3aae79270f

View File

@@ -436,6 +436,11 @@ bool CameraImages::readPoses(std::list<Transform> & outputPoses, std::list<doubl
UERROR("With Karlsruhe format, timestamps (%d) and poses (%d) should match!", (int)stamps.size(), (int)poses.size());
return false;
}
else if(!outputPoses.empty() && inOutStamps.empty() && stamps.empty())
{
UERROR("Timestamps are empty (poses=%d)! Forgot the set a timestamp file?", (int)outputPoses.size());
return false;
}
}
UASSERT_MSG(outputPoses.size() == inOutStamps.size(), uFormat("%d vs %d", (int)outputPoses.size(), (int)inOutStamps.size()).c_str());
return true;