mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-03 16:47:47 +08:00
more flaky fixes
This commit is contained in:
@@ -97,6 +97,12 @@ void PyDescriptor::parseParameters(const ParametersMap & parameters)
|
||||
|
||||
_import_array();
|
||||
|
||||
// Invalidate importlib's directory-listing caches so a script created
|
||||
// after sys.path was first scanned in this process is still found.
|
||||
// Without this, the second Py* instance pointing at a freshly-written
|
||||
// script in an already-known directory fails with ModuleNotFoundError.
|
||||
PyRun_SimpleString("import importlib; importlib.invalidate_caches()");
|
||||
|
||||
std::string scriptName = uSplit(UFile::getName(path_), '.').front();
|
||||
PyObject * pName = PyUnicode_FromString(scriptName.c_str());
|
||||
UDEBUG("PyImport_Import() beg");
|
||||
|
||||
@@ -46,6 +46,12 @@ PyDetector::PyDetector(const ParametersMap & parameters) :
|
||||
|
||||
_import_array();
|
||||
|
||||
// Invalidate importlib's directory-listing caches so a script created
|
||||
// after sys.path was first scanned in this process is still found. Without
|
||||
// this, the second PyDetector instance pointing at a freshly-written
|
||||
// script in an already-known directory fails with ModuleNotFoundError.
|
||||
PyRun_SimpleString("import importlib; importlib.invalidate_caches()");
|
||||
|
||||
std::string scriptName = uSplit(UFile::getName(path_), '.').front();
|
||||
PyObject * pName = PyUnicode_FromString(scriptName.c_str());
|
||||
UDEBUG("PyImport_Import() beg");
|
||||
|
||||
@@ -53,6 +53,12 @@ PyMatcher::PyMatcher(
|
||||
|
||||
_import_array();
|
||||
|
||||
// Invalidate importlib's directory-listing caches so a script created
|
||||
// after sys.path was first scanned in this process is still found.
|
||||
// Without this, the second Py* instance pointing at a freshly-written
|
||||
// script in an already-known directory fails with ModuleNotFoundError.
|
||||
PyRun_SimpleString("import importlib; importlib.invalidate_caches()");
|
||||
|
||||
std::string scriptName = uSplit(UFile::getName(path_), '.').front();
|
||||
PyObject * pName = PyUnicode_FromString(scriptName.c_str());
|
||||
UDEBUG("PyImport_Import");
|
||||
|
||||
@@ -633,12 +633,12 @@ TEST_F(RtabmapIntegrationFixture, PR2_Scan2D_RGBD)
|
||||
EXPECT_GE(result.gridObstacleCells, 4400);
|
||||
EXPECT_LE(result.gridObstacleCells, 4900);
|
||||
#ifdef RTABMAP_OCTOMAP
|
||||
// Observed: empty 6072-7474, obstacle 39924-42883. Bounds are wide
|
||||
// Observed: empty 6072-8037, obstacle 39924-42883. Bounds are wide
|
||||
// because without g2o (OdomF2M/BundleAdjustment disabled) visual
|
||||
// odometry drifts a bit differently run-to-run, which propagates into
|
||||
// the assembled occupancy grid.
|
||||
EXPECT_GE(result.octomapEmptyCells, 5500);
|
||||
EXPECT_LE(result.octomapEmptyCells, 8000);
|
||||
EXPECT_LE(result.octomapEmptyCells, 8500);
|
||||
EXPECT_GE(result.octomapObstacleCells, 38000);
|
||||
EXPECT_LE(result.octomapObstacleCells, 44000);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user