ORB_SLAM2-PythonBindings
ORB_SLAM2-PythonBindings copied to clipboard
Call "get_tracked_mappoints()" but no response
To get the 3D map points built by orb-slam, I call the function of slam:
map_pts = slam.get_tracked_mappoints()
print(map_pts)
But the program stuck here and no response.
I have a similar issue, but I get 'Segmentation fault' error.
I found there are empty elements in map points causing the segmentation fault.
You can modify the code in src/ORBSlamOython.cpp Line:311
to
for(size_t i=0; i<Mps.size(); i++) {
if(Mps[i] != NULL){
cv::Mat wp = Mps[i]->GetWorldPos();
map_points.append(boost::python::make_tuple(
wp.at<float>(0,0),
wp.at<float>(1,0),
wp.at<float>(2,0)
));
}
}