ORB_SLAM3
ORB_SLAM3 copied to clipboard
Assertion (mit->second>=3) failing in LocalInertialBA function
Hi,
I am running the monocular-inertial version of ORBSLAM3 with the following configuration:
- Robot: A smart wheelchair
- Camera: Intel RealSense D435i
- Camera frequency: 15 Hz
- IMU: BMI055(embedded inside the camera)
- IMU frequency: ~ 200 Hz
The initialization phase happens smoothly. But after initialization, the following assertion fails when the LocalMapping thread calls LocalInertialBA from optimizer.cc.
~/git/ORB_SLAM3/src/Optimizer.cc:4878: static void ORB_SLAM3::Optimizer::LocalInertialBA(ORB_SLAM3::KeyFrame*, bool*, ORB_SLAM3::Map*, bool, bool): Assertion `mit->second>=3' failed.
If I remove the assertion, the LocalInertialBA runs with no further problem, but the next keyframe gets added at the wrong location.
Has anyone run into this issue? May I know what causes this error?
Thanks a lot for your help!
Sai Prakash Reddy C
Getting the same error about 20% of the time when running on EUROC-MAV sequences
Hi,
I am running the monocular-inertial version of ORBSLAM3 with the following configuration:
- Robot: A smart wheelchair
- Camera: Intel RealSense D435i
- Camera frequency: 15 Hz
- IMU: BMI055(embedded inside the camera)
- IMU frequency: ~ 200 Hz
The initialization phase happens smoothly. But after initialization, the following assertion fails when the LocalMapping thread calls LocalInertialBA from optimizer.cc.
~/git/ORB_SLAM3/src/Optimizer.cc:4878: static void ORB_SLAM3::Optimizer::LocalInertialBA(ORB_SLAM3::KeyFrame*, bool*, ORB_SLAM3::Map*, bool, bool): Assertion `mit->second>=3' failed.
If I remove the assertion, the LocalInertialBA runs with no further problem, but the next keyframe gets added at the wrong location.
Has anyone run into this issue? May I know what causes this error?
Thanks a lot for your help!
Sai Prakash Reddy C
is solved? thanks
No, I couldn't figure out what triggers this error.
Hi,
I am running the monocular-inertial version of ORBSLAM3 with the following configuration:
- Robot: A smart wheelchair
- Camera: Intel RealSense D435i
- Camera frequency: 15 Hz
- IMU: BMI055(embedded inside the camera)
- IMU frequency: ~ 200 Hz
The initialization phase happens smoothly. But after initialization, the following assertion fails when the LocalMapping thread calls LocalInertialBA from optimizer.cc.
~/git/ORB_SLAM3/src/Optimizer.cc:4878: static void ORB_SLAM3::Optimizer::LocalInertialBA(ORB_SLAM3::KeyFrame*, bool*, ORB_SLAM3::Map*, bool, bool): Assertion `mit->second>=3' failed.
If I remove the assertion, the LocalInertialBA runs with no further problem, but the next keyframe gets added at the wrong location.
Has anyone run into this issue? May I know what causes this error?
Thanks a lot for your help!
Sai Prakash Reddy C
I meet the same problem. Is it solved?
I meet the same problem. Is it solved?
No, I couldn't figure out what triggers this error.
Compile all code with the release. by this way , we avoid this error.
Compile all code with the same release method, e.g., g2o, voc, and orbslam3.
@guchangjun 不太理解,能详细解释一下吗?
@xinruozhishui201314 when compiled in debug mode, i encountered the assert(mit->second>=3) problem in localmapping thread. but if i compiled the project in release mode (as well as g2o ThirdParty), the issue disappeared. I yet have not figured out the reason behind, but it works. The only drawback is cant debugging.
why?who knows the questions ?
I guess this is because of the implementation of the macro assert. assert will be regard as a fatal error in debug mode but will be regard as nothing in release mode. The implementation in GCC will be like:
#ifdef NDEBUG
#define assert(expr) (__ASSERT_VOID_CAST(0))
#else
#define assert(expr) (static_cast
The answer may be that in release mode the compiler defines the macro NDEBUG, which make the compiler ignore assert() function, and nothing happens when mit->second >= 3. However, the condition will trigger the __assert_fail() function in Debug mode. In my opinion, this line may not affect the loop closing result. Maybe this line can be removed when using it.
Hi, I am running the monocular-inertial version of ORBSLAM3 on Euroc-MAV dataset and ecountering this error: ~/git/ORB_SLAM3/src/Optimizer.cc:4878: static void ORB_SLAM3::Optimizer::LocalInertialBA(ORB_SLAM3::KeyFrame*, bool*, ORB_SLAM3::Map*, bool, bool): Assertion `mit->second>=3' failed.
Please let me know the intuition behind assertion mit->second >=3. Is removing this assertion correct way of solving the problem or will it give wrong results? I thought of resetting the active map when this assertion fails but then it is resetting and losing the entire map very often in upcoming frames. is there any other alternative? Please help.
I only meet this problem while compiling program with"DEBUG" .when i use Release mode ,this problem is missing but the cam pose was wrong