raulmur / ORB_SLAM2

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
Other
9.41k stars 4.69k forks source link

URGENT: Segmentation Fault or OpenCV Exception error when tracking is lost. #757

Open nalinraut opened 5 years ago

nalinraut commented 5 years ago

I am using ros_stereo.cc to extract poses of each frame, however, once tracking is lost it gives me a Segmentation Fault error or OpenCV error. I am simply printing Tcw.at(0,3). If I don't print the value or use it, there is no error.

AlejandroSilvestri commented 4 years ago

@nalinraut

This is a late response to your urgent question.

I'm pretty sure your Tcw is an empty Mat when tracking is lost (because while lost, there's no camera pose), thus the seg fault.