Giter Site home page Giter Site logo

beewe / orb_slam2_windows Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raulmur/orb_slam2

53.0 53.0 15.0 84.14 MB

Windows Version of ORB_SLAM2, see website.

Home Page: https://github.com/raulmur/ORB_SLAM2

License: Other

CMake 3.68% C++ 95.66% C 0.62% Shell 0.04%

orb_slam2_windows's People

Contributors

beewe avatar raulmur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

orb_slam2_windows's Issues

How to build in Windows Visual Studio

As the description mentioned that it was tested under Windows 7, Visual Studio 2013 (MSVC 12), OpenCV3. I am wondering do you have detail guide to build it for Visual Studio.

Thank you very much for your help.

Slam runs very slow.

Hello,

I am trying to run the ORB_SLAM2 using visual studio but it takes a lot of time for initilaization and loading of new frames. So I tried commenting out the sleep call of the main thread as follows.

  double T=0;
	if (ni<nImages - 1)
	{
		T = vTimestamps[ni + 1] - tframe;
	}
       
	else if (ni>0)
	{
		T = tframe - vTimestamps[ni - 1];
	}
       
	if (ttrack < T)
	{
		//std::this_thread::sleep_for(std::chrono::milliseconds((int)((T - ttrack)*1e6)));
	}

Now the speed has improved significantly but not real time.
Also I did not understand why the above piece of code is used.
Can someone explain this?

Strange gimbal flipping in rotation.

Hi! I have this code running great, but the rotation I am exporting seems strange. I get the camerapose from TrackStereo, then invert it with the code from:

void MapDrawer::GetCurrentOpenGLCameraMatrix(pangolin::OpenGlMatrix &M)
{
    if(!mCameraPose.empty())
    {
        cv::Mat Rwc(3,3,CV_32F);
        cv::Mat twc(3,1,CV_32F);
        {
            unique_lock<mutex> lock(mMutexCamera);
            Rwc = mCameraPose.rowRange(0,3).colRange(0,3).t();
            twc = -Rwc*mCameraPose.rowRange(0,3).col(3);
        }

Then send the Rwc Matrix to the converter:

std::vector<float> Converter::toQuaternion(const cv::Mat &M)

{
    Eigen::Matrix<double,3,3> eigMat = toMatrix3d(M);
    Eigen::Quaterniond q(eigMat);

    std::vector<float> v(4);
    v[0] = q.x();
    v[1] = q.y();
    v[2] = q.z();
    v[3] = q.w();

    return v;
}

What I see is this: (compared with inertial data)

plot

The middle section, where the data is incorrect, is when I rotate in Yaw 180 degrees. Am I going wrong with my conversions somewhere?

Thanks yet again! :)

release error and debug error

Hello,Thanks for sharing orb_slam2_windows. I met different errors while running rgbd-tum under Windows 7 ,VS2013.
when I choose release running, It said"A buffer overrun has occurred in rgbd_tum.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program."
when I choose debug, It failed with "Opengl error ".

Did you erver meet this kind of error?Any suggestions?

g2o compilation issue and final application throwing error 0xc000007b

Hi ,
I am trying run it on windows and in doing so I have successfully compiled dbow , pangolin . However I am not able to build g2o on windows . It requires LAPACK and BLAS for it, which some strage reason I am not able to build.
Is there is any workaround it? I checked original g2o libraries CMAKELIST file its seems like they are putting it as a optional thing for windows.
CMakeLists.txt From original G2o
I tried to do the same with our CMAKE file.By this I am able to generate and compile g2o successfully.
CMakeLists.txt Modified

But it seems like something is going wrong after compilation I am getting following error while running mono kitti . I suspect it is because of faulty Dll compilation of g2o .
error

If you have, can you please provide .lib and .dll for g2o for x64 and x86? Any tip for g2o compilation with LAPACK and BLAS would also help.

Thanks in Advance

Compilation issues and solutions

I have come across various compilation issues and solved them, so I'll put the process here for everyone else. I may not have the same problems as other people, but hopefully this is helpful!

Operating System: Windows 10, 64 bit
Compiler: Visual Studio 2015

Half of the changes are to support more recent libraries such as OpenCV3 and Eigen3. I think these are all the changes I made:

(1) g2o can't find BLAS and LAPACK. The original ORB_SLAM2 g2o CMakeLists.txt file has removed the following two lines, and it seems to work:

-    FIND_PACKAGE(BLAS REQUIRED)
-    FIND_PACKAGE(LAPACK REQUIRED)

I also removed the g2o cmake_modules folder, since it apparently isn't needed either. I think it works because BLAS and LAPACK are in Eigen3?

(2) Every time there was an OpenCV dependency, I changed the following lines to support OpenCV3. This is only necessary if you use 3:

  -    find_package(OpenCV 2.4.3 REQUIRED)
  +    find_package(OpenCV 3.0 QUIET)
  +    if(NOT OpenCV_FOUND)
  +       find_package(OpenCV 2.4.3 REQUIRED)
  +    endif()

(3) I also had to change line 56 of linear_solver_eigen.h to support eigen3.3 (g2o will compile without this change, ORB_SLAM2 may not):

-    typedef Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic, SparseMatrix::Index> PermutationMatrix;
+    typedef Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic> PermutationMatrix;

(4) When configuring ORB_SLAM2 itself, I had another issue in PangolinConfig.cmake, so I've fixed by removing:

-    add_library(_libjpeg STATIC IMPORTED)
-    set_target_properties(_libjpeg PROPERTIES
-        IMPORTED_LOCATION C:/Program Files/Pangolin/build/external/libjpeg/lib/jpeg.lib
-    )

Important: I also put quotes around all of directories in that file.

(5) If the linker can't find anything such as "_libjpeg", go into Project -> Properties -> Linker -> Input, and into Additional Dependencies. Double check all the values in there. As for _libjpeg.lib, I replaced it with C:/Program Files/Pangolin/build/external/libjpeg/lib/jpeg.lib (or the relevant location).

(6) It also complained about a runtime library mismatch. The two options are:

  1. RECOMMENDED: recompile Pangolin as a DLL (check BUILD_SHARED_LIBS is ON and MSVC_USE_STATIC_CRT to OFF in CMake).
  2. Go into ORB_SLAM2 Project -> Properties -> C/C++ -> Code Generation, set Runtime Library from Multi-threaded DLL (/MD) to Multi-threaded (/MT). You may need to do this for each individual project. I didn't get this method to work, because it would involve a lot of recompiling.

Also make sure that each time you compile something, the Debug/Release mode is consistent.

Camera spec

Hi again, not an issue, just a question... I am going to update my stereo camera setup to run your system live. Is 640 x 480 enough? Or would you recommend a higher resolution?

Global shutter, 120 fps...

Thanks again for your code!

Program hanging when returning from frame()

Hi Beewe,

I am running your windows version in vs 2015, it gets compiled ok, but when I run the program in monocular mode( either mono_kitti or mono_tum), it always hangs forever when returning from calling
mCurrentFrame = Frame(mImGray,timestamp,mpIniORBextractor,mpORBVocabulary,mK,mDistCoef,mbf,mThDepth). I stepped into frame function, it successfully returned to where it was called, then when I stepped into the next line of code, the program just hang there forever. The debugger doesn't say anything wrong.

Have you ever had this problem? Do you have any idea why this happens? Thanks!

g2o compilation

Hello,

I would like to use ORB_SLAM in windows and I came up to your repository. I was able to compile DBoW2 but unfortunatelly I was not able to compile compile g2o. Is is possible to give some more instructions on how to compile ORB_SLAM on windows?

Thank you in advance,

Vasilis

Indication for change in internal scale

Hi @Beewe ,
I am using orbslam2 to get the odometry in metres. It gives good results. But, after a few rotations especially in new areas, there are huge chance that the internal scale changes drastically. So, I have to calculate the scale again.
But I want to know if there is some parameter in the software which is affected by the change in internal scale and can be used to convey the information.

Thanks a lot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.