Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash after normal work. Exit code -11. #59

Closed
leonks117 opened this issue Dec 14, 2014 · 2 comments
Closed

Crash after normal work. Exit code -11. #59

leonks117 opened this issue Dec 14, 2014 · 2 comments

Comments

@leonks117
Copy link

svo_ros crashes after some time of normal work without any reasons, but more often after loosing key points:

[ WARN] [1418586423.032571586]: Not enough matched features.
[ WARN] [1418586423.154933626]: Relocalizing frame
[svo-1] process has died [pid 3367, exit code -11, cmd /home/lev/WORK/ros_package/svo/svo_cat/devel/lib/svo_ros/vo __name:=svo __log:=/home/lev/.ros/log/3e2184e8-83c9-11e4-a54c-74e5434b8949/svo-1.log].
log file: /home/lev/.ros/log/3e2184e8-83c9-11e4-a54c-74e5434b8949/svo-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

You can find the same problem when playing

rosbag airground_rig_s3.bag -l

and

roslaunch svo_ros test_rig3.launch 

and after 1-st loop SVO will die with exit code -11

I'm using lenovo laptop with Intel® Celeron(R) CPU B820 @ 1.70GHz × 2 and GeForce 610M/PCIe/SSE2. Ubuntu 14.04 with ROS Indigo. 64-bits

How can i solve this problem?

@GhisHD
Copy link

GhisHD commented Dec 15, 2014

Hi Leonks117,
This is interesting, this issue seems to be similar with the issue #58.
In the issue 58 when no feature is find the system go in "Relocalizing" state, in this state if the system didn't find any "closest key frame" the process can crash.
Are you able to compile SVO in RelWithDebInfo, and launch the application with gdb to have the call stack ? (launch "gdb MyApp" run in gdb and get the call stack with "bt" or "where") to check if the 2 issue is similar. In #58 the crash append in the "getClosestKeyframe" method.
For the #58 issue I did this modification in the code to unblock the situation (new lines end with // NEW CODE):

In map.cpp
FramePtr Map::getClosestKeyframe(const FramePtr& frame) const
{
list< pair<FramePtr,double> > close_kfs;
getCloseKeyframes(frame, close_kfs);
if(close_kfs.empty()) // NEW CODE
{ // NEW CODE
return nullptr; // NEW CODE
} // NEW CODE

      // Sort KFs with overlap according to their closeness
      close_kfs.sort(boost::bind(&std::pair<FramePtr, double>::second, _1) <
                     boost::bind(&std::pair<FramePtr, double>::second, _2));

      if(close_kfs.front().first != frame)
        return close_kfs.front().first;
      close_kfs.pop_front();
      if(close_kfs.empty() == true)    // NEW CODE
          return nullptr;              // NEW CODE
      return close_kfs.front().first;
    }

In frame_handler_mono.cpp
FrameHandlerMono::UpdateResult FrameHandlerMono::relocalizeFrame(
const SE3& T_cur_ref,
FramePtr ref_keyframe)
{
SVO_WARN_STREAM_THROTTLE(1.0, "Relocalizing frame");
if(ref_keyframe == nullptr) // NEW CODE
{ // NEW CODE
SVO_INFO_STREAM("Relocalization successful."); // NEW CODE
return RESULT_FAILURE; // NEW CODE
} // NEW CODE
SparseImgAlign img_align(Config::kltMaxLevel(), Config::kltMinLevel(),
30, SparseImgAlign::LevenbergMarquardt, false, false);
size_t img_align_n_tracked = img_align.run(ref_keyframe, new_frame_);
if(img_align_n_tracked > 30)
{
........

@leonks117
Copy link
Author

Hi! You was right about getClosestKeyframe, I have got the same result from gdb:

Program received signal SIGSEGV, Segmentation fault.
svo::Map::getClosestKeyframe (this=this@entry=0x8a08d0, frame=...) at /home/lev/WORK/ros_package/svo/svo_cat/src/rpg_svo/svo/src/map.cpp:150

And after modification code, this problem was solved. Thanks for the quick support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants