ORB_SLAM2-PythonBindings icon indicating copy to clipboard operation
ORB_SLAM2-PythonBindings copied to clipboard

Patching failure

Open lloydrayner opened this issue 5 years ago • 3 comments

Hi,

I have managed to build and run standard ORB-SLAM2. I am now trying to work within Python, I get a patching error on lines 119 and 477. Wondered if anyone knows what could be causing this?

Screenshot from 2019-12-07 10-38-48

lloydrayner avatar Dec 07 '19 10:12 lloydrayner

oh... I think I may have figured it out.

Am I supposed to apply the patch to all three files?

patch CMakeLists.txt < orbslam-changes.diff patch include/System.h < orbslam-changes.diff patch src/System.cc < orbslam-changes.diff

lloydrayner avatar Dec 07 '19 10:12 lloydrayner

The patch certainly affects all three of those files. I was using git patch to affect them all at once (I assumed git would be available since it was cloned from github), but if this works, go for it.

jskinn avatar Dec 18 '19 09:12 jskinn

I get the same issue? I followed the instructions and ran ~/slam/ORB_SLAM2$ git apply -v --ignore-whitespace orbslam-changes.diff and I get:

Checking patch CMakeLists.txt...
error: while searching for:
Examples/Monocular/mono_euroc.cc)
target_link_libraries(mono_euroc ${PROJECT_NAME})


error: patch failed: CMakeLists.txt:111
error: CMakeLists.txt: patch does not apply
Checking patch include/System.h...
error: while searching for:
    // Information from most recent processed frame
    // You can call this right after TrackMonocular (or stereo or RGBD)
    int GetTrackingState();
    std::vector<MapPoint*> GetTrackedMapPoints();
    std::vector<cv::KeyPoint> GetTrackedKeyPointsUn();


error: patch failed: include/System.h:119
error: include/System.h: patch does not apply
Checking patch src/System.cc...
error: while searching for:
    return mTrackingState;
}

vector<MapPoint*> System::GetTrackedMapPoints()
{
    unique_lock<mutex> lock(mMutexState);

error: patch failed: src/System.cc:477
error: src/System.cc: patch does not apply

What am I doing wrong? It isnt as if the codebase changed, orbslam2 hasn't been updated in years! @jskinn could you please weigh in on this? Thank you

kevkid avatar Nov 20 '20 21:11 kevkid