Giter Club home page Giter Club logo

mageslam's Introduction

MAGE-SLAM

MAGE-SLAM is a simultaneous localization and mapping library written in C++.

Current Status

This repository is pre-preview and is not ready to be independently consumed at this time.

Getting Started

Currently, only one "golden path" scenario is supported. This "golden path" represents little more than a proof of functionality and should not be considered stable: it will be subject to very frequent changes and improvements as development on this repository continues.

Requirements: Visual Studio 2017 (with components required for C++ development), CMake.

  1. Install OpenCV 3.4.0. Installing will create a directory somewhere on your computer (presumably of your choosing) with the OpenCV headers and binaries in it; C:\libraries\opencv is an example of such a path. We will refer to this path henceforth as [OPENCV_INSTALL_DIRECTORY].
  2. Clone this repository. Note that this repository uses submodules and thus may have deep directory structures. To avoid problems with overlong file paths, you may want to clone the repository to a shallow location such as C:\repos\mageslam.
  3. cd into the MAGE-SLAM repository and install all submodules: git submodule update --init --recursive. Note that some submodules are very large, so this process may take many minutes (Boost, the largest submodule by far, reports cloning times in the range of half an hour).
  4. Create a build folder in the repository: mkdir Build.
  5. cd into your build folder and generate your project files using CMake: cmake -G "Visual Studio 15 2017" -A x64 -D OpenCV_DIR="[OPENCV_INSTALL_DIRECTORY]" .. (see notes below for information about this command).
  6. Launch the Visual Studio solution generated by CMake: start MAGESLAM.sln.
  7. The Console app should already be set as the startup project. Build the Console app to build the entire project, or build all using Ctrl+Shift+B. At present, the MAGE-SLAM build (especially the first one) is very slow; be prepared to wait twenty minutes or more for the build to complete.
  8. The Console app is currently hardcoded to process a video file located at C:\scratch\video.mp4. You can either place a video in this location or change the Console to look for a video elsewhere.
  9. If your OpenCV installation's binaries folder is not in your PATH, the Console app may not be able to launch because it can't find the OpenCV DLLs. The simplest solution to this is simply to copy all three DLLs from [OPENCV_INSTALL_DIRECTORY]\build\x64\vc15\bin and paste them next to the Console.exe Visual Studio is trying to run.

Note: Apart from the source directory, the CMake command provided in step 5 has three arguments: -G mandates the generation of a VS 2017 project, -A specifies x64 as the target architecture, and the final flag tells CMake where to find OpenCV. All three of the arguments are included to make it as straightforward as possible to integrate with the OpenCV 3.4.0 release binaries, which do not support either x86 or versions of Visual Studio higher than 2017. These "golden path" constraints will disappear when our procedure for depending on OpenCV matures.

Deployment

There is no official deployment mechanism available at this time.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests to us.

Maintainers

With questions, please contact one of the following maintainers:

Reporting Security Issues

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

mageslam's People

Contributors

microsoft-github-operations[bot] avatar microsoftopensource avatar syntheticmagus 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mageslam's Issues

Can you please explain the camera model?

Hi and thanks for making this code available.

How can i use general camera intrinsics(fx,fy,cx,cy) with this code?

I see the camera is setup with:

    std::vector<float> distortionCoefficients(5, 0);
    distortionCoefficients[0] = 0.094f;
    distortionCoefficients[1] = -0.35f;
    distortionCoefficients[2] = 0.42f;
    mage::calibration::LinearFocalLengthModel model{ 
        mage::calibration::Line{ -0.000111f, 0.81878f },
        mage::calibration::Line{ -0.000188f, 1.4517f },
        0.5064f,
        0.5115f,
        mage::calibration::Bounds{ 550, 700 }, 
        mage::Size{ 1920, 1080 },
        distortionCoefficients };
    std::shared_ptr<const mage::calibration::Poly3KCameraModel> cameraModel =
        model.CreatePoly3kCameraModel(650, 320, 180);

Can you please explain how I would pass fx,fy,cx,cy into this function?

Thank you!

Create a debug viewer

At present, there's no provided way to visualize the output of a MAGE-SLAM track in order to sanity check it (as a separate issue from GT). A simple visualization app should be provided to serve this function.

Current considerations:

  • Babylon Native may provide the easiest integration point for creating a visualizer.
  • Depending on the number of dependencies (for example, Babylon Native has quite a few), it may be preferable for the visualizer app to exist in a separate repository as opposed to being checked into the MAGE-SLAM repository itself. In this way, the visualizer could also serve as an example integration without cluttering other integrations that want to use MAGE-SLAM with different technologies.

Rename mira namespace

The term mira as a namespace is not meaningful. Replace this namespace with one that more clearly indicates what sort of implementation resides in the namespace.

Use arcana.cpp

The version of Arcana currently in MAGE-SLAM is an older (and larger) version of arcana.cpp. MAGE-SLAM should be changed to take arcana.cpp as a dependency and use the implementation there; redundant implementations should be removed, and missing features should be either added to arcana.cpp or separated out in this repository.

Remove legacy serialization formats

MAGE-SLAM supports several outdated and unused serialization formats; we should resolve on one and remove the support for the others. BOB, I believe, is the most modern and robust of the formats, and so is almost certainly the one we should reduce down to.

Race condition in TrackLocalMapWorker.cpp

// BUG: make sure the pose estimation waits for the updated history

The bug referred to by this line actually manifests as coming from Runtime.cpp, where a timing issue allows TrackingData.IsLost to be true while m_trackLocalMapWorker->GetHistory() is still empty, sending the program down the wrong side of a conditional statement that ultimately crashes when it tries to use information from the empty pose history.

The correct solution to this problem is likely to revise either the task chain or the scheduler to ensure that the pose history must be updated before IsLost is set to true. However, a quicker workaround that simply checks the history size when it checks IsLost can prevent crashes immediately and thus may be worth adding in the short term.

Consider removing outdated/unnecessary files

The following files have been identified as possible legacy code and might should be separated out and/or removed.

  • collection.h
  • date_assert.h
  • DeNoising.cpp
  • DeNoising.h
  • FormatString.inl
  • Plat/*
  • ValidateBuildFlavor.cpp
  • ValidateBuildFlavor.h
  • VolumeOfInterest.cpp
  • VolumeOfInterest.h

Switch from C++ 14 to C++ 17

This will allow the replacement of several Boost types with STL equivalents: most notably, optional. This may also be necessary in order to make use of arcana.cpp, as described in #4.

Enable Windows build for VS 2019

At time of writing, the only version of Visual Studio supported by the build instructions is 2017. The only (known) reason for this is the use of OpenCV 3.4 binaries, which are provided with implementations up to, but not beyond, VS 2017, and the CMake package therefore fails if the generator is targeting VS 2019. There are likely a number of viable solutions to this: upgrading OpenCV, building a custom OpenCV install, tweaking the build to simply not fail and link against the older DLL, etc. These options should simply be explored, evaluated, and implemented/documented appropriately to enable the use of newer versions of Visual Studio.

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.