This is a sample project for using ORB_SLAM2 stereo for inside-out tracking of AR/VR scenario with VisionerTech VMG-PROV setup. We compile ORB_SLAM2 in windows and use it as a rendering plugin for Unity. A loose coupling IMU approach for camera rotation running only in Unity side, on the other hand, camera position is provided by ORB_SLAM2. "/RenderingPlugin/" holds a visual studio 2013 project building ORB_SLAM2, camera capturing, IMU data, rendeing setup and other things to a .dll for Unity. "/UnityProject/" holds a Unity project.
- Recommended specs: Intel Core i5-4460/8G RAM/GTX 660/at least two USB3.0/
- Windows x64 version.(tested on win7/win10)
- If no Visual Studio 2013 is installed, install X64 version of Visual C++ Redistributable Packages for Visual Studio 2013.
- Replace the calibration files in "/save_param/" to your VMG-PROV setup.
- Open the project with Unity Editor X64 version(tested with Unity 5.4.0f3 (64-bit)).
- Open the "scene" scene.
- "StereoCamera" Object holds a pair of Camera and real world image background. "WorldPlaneIMU" object holds a virtual world surface plane and a cylinder. If you are adding your own objects, please do add them under WorldPlaneIMU.
- Run it and you will see stereo image pairs.
- Click "Button" to start SLAM system for tracking the camera pose.
- If you want to build a running .exe, please do build x64 version.
- "/RenderingPlugin/VisualStudio2013/RenderingPlugin.sln" holds the Visual Studio 2013 project compiling the dll for Unity. Please do use Visual Studio 2013 to compile, dependencies like OSB_SLAM2 is compiled in a Visual Studio 2013 environment(it takes some time to port from Linux), it's no guarantee of success with other compilers.
- Install OpenCV 3(tested with OpenCV 3.1.0) and config RenderingPlugin project to your environment.
- "/ORB_SLAM2/" holds prebuild libs of ORB_SLAM2.
- Build the Release X64 version. The RenderingPlugin.dll is copied to "/UnityProject/Assets/Plugins/x86_64/".