EAO-SLAM
EAO-SLAM copied to clipboard
Segmentation Fault caused by "Eigen"
Both the created class "Object_Map" in file "Object.h" and the modified class "Frame" in file "Frame.h" contain several member variables that are fixed-size vectorizable "Eigen" class. In my computer, these two classes have caused a segmentation fault due to memory misalignment. Therefore, it is recommended to add a macro "EIGEN_MAKE_ALIGNED_OPERATOR_NEW" in the public part of these two classes.
Thank you for sharing! Excuse me, where should this macro be added?
Thank you for sharing! Excuse me, where should this macro be added?
In Frame.h:
In Object.h
Thank you for your reply, and I have also tried your method, but it seems that this method did not help me run the entire program. This is the problem I encountered: ORB Extractor Parameters:
- Number of Features: 1000
- Scale Levels: 8
- Scale Factor: 1.2
- Initial Fast Threshold: 20
- Minimum Fast Threshold: 7 read groundtruth.txt
Start processing sequence ... Images in the sequence: 405
Offline semi-dense mapping and line segment extraction updating model New Map created with 153 points 段错误 (核心已转储)
Try changing the member variable "mLastFrame" of class "Tracking" to a pointer form
Thank you again for your reply! In fact, I understand how to implement your suggestion. So I consulted some materials and learned from some blogs that this seems to be a step in orb slam2. Is this step already in the code for the case?
Thank you again for your reply! In fact, I understand how to implement your suggestion. So I consulted some materials and learned from some blogs that this seems to be a step in orb slam2. Is this step already in the code for the case?
The official program of orb-slam2 has not yet converted "mLastFrame" into a pointer, but I personally believe that this writing method is risky because the "Frame" class contains too many member variables, which can easily cause memory overflow. For example, I once attempted to further introduce line feature extraction (LSD + LBD). According to the official source code, the member variable "mLastFrame" will be called during monocular camera initialization ("MonocularInitialization" function), and at this time, due to further increasing the amount of data loaded in memory, it will cause "Segment Faults". Therefore, dynamically allocating memory (pointer form) may be a more reasonable and secure way.
Thank you for your reply! Modifying these codes is beyond my ability.