The SolAR SLAM samples show a SolAR pipeline for augmented reality based on a SLAM (Simultaneous Localization And Mapping).
StandAlone | Plugin |
Before running the samples, you need to download data such as videos and the vocabulary of the bag of word used for image retrieval. To install the required data, just launch the following script:
installData.bat
./installData.sh
This script will install the following data into the ./data
folder:
- The bag of words downloaded from our [GitHub releases] (https://github.com/SolarFramework/binaries/releases/download/fbow%2F0.0.1%2Fwin/fbow_voc.zip) and unzipped in the
./data
folder. - A video for test from the TUM RGB-D benchmark dataset downloaded from our Artifactory and copied in the
.\data
.
We provide a defaut camera calibration file that contains intrinsic parameters of the camera logitech C920.
If you want to change the calibration parameters of the camera, edit the camera_calibration.json
file.
SolAR SLAM supports two initialization modes: fiducial marker based or markerless based.
-
For fiducial marker based:
-
SolAR SLAM samples require a fiducial marker to initialize. So you need to print the Fiducial Marker and put it into the scene.
-
If you want to change your fiducial marker, you can edit the
fiducialMarker.yml
. -
Set the
hasPose
parameter value ofSolARSLAMBootstrapper
component to1
in the configuration file.
-
-
For markerless based:
- Not any marker is required. Just set the
hasPose
parameter value ofSolARSLAMBootstrapper
component to0
in the configuration file.
- Not any marker is required. Just set the
From the binary directory, run following command for testing SolAR SLAM:
- For pipeline plugin test:
SolARPipelineTest_SLAM.exe ..\..\data\SolARPipelineTest_SLAM_TUM_conf.xml
\.run.sh .\SolARPipelineTest_SLAM ..\..\data\SolARPipelineTest_SLAM_TUM_conf.xml
Press escape
to quit the application.
Change the deviceID
parameter in the configuration file to the corresponding ID of the camera that you use. From the binary directory, launch the execution for testing SolAR SLAM:
- For pipeline plugin test:
SolARPipelineTest_SLAM.exe
\.run.sh .\SolARPipelineTest_SLAM
-
When the application is started, if you use the fiducial marker based initialization, point the camera to the fiducial marker (you can see a virtual cube on the marker). Otherwise, point the camera in front of the scene.
-
Then move the camera to initialize the SLAM (recommend moving horizontally). Note that for the fiducial marker based, make sure the fiducial marker is always in view of the camera. The initialization is successful when appearing green points in the image.
-
⚠️ If the initialization is still not successful after a few seconds (This is normally due to texture-less scenes), you can add some objects into the scene and restart. -
Now you can move the camera freely. The SolAR SLAM can track the camera pose and at the same time, you see in a dedicated window the 3D point cloud reconstructed by the SLAM. Note that the fiducial marker is only used for the initialization, it can be removed from the scene later.
-
⚠️ In the case of lost tracking, you can return the camera to the previous views to relocalize camera pose instead of restarting. -
Press
escape
to quit the application.
Image viewer (from OpenCV) and 3D points viewer (from OpenGL) cannot be opened at the same time.
Website https://solarframework.github.io/
Contact framework.solar@b-com.com