From 2f561576c5af672405809417ab947ee69195d5f7 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 23 Nov 2014 17:45:27 -0800 Subject: [PATCH 01/11] Created Tools (markdown) --- Tools.md | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Tools.md diff --git a/Tools.md b/Tools.md new file mode 100644 index 0000000..28f9329 --- /dev/null +++ b/Tools.md @@ -0,0 +1,78 @@ +## Database viewer +This tool is useful to browse stuff saved in a RTAB-Map database. You can also generate 3D map, TORO graph, DOT graph and extract images from the database. For example with this database: [5MappingSessions_OnlineConstraint700ms.db.zip](https://drive.google.com/uc?id=0B46akLGdg-uaYVpSZWpoSW1NTVE) + ``` +$ rtabmap-databaseViewer 5MappingSessions_OnlineConstraint700ms.db +``` +You can browse images in the database. Explore also the right clicks over the views, more options available as well as in the menus. + +[[doc/Tools/database_viewer.png]] + +## Odometry viewer +This tool is a simple application from the terminal to try different odometry approaches implemented in RTAB-Map. This mostly the same as in RTAB-Map->Edit->Preferences->Odometry->"Test odometry" but from the terminal. Look at the examples shown in the usage below. + ``` +$ rtabmap-odometryViewer +Usage: +odometryViewer [options] +Options: + -bow # Use bag-of-words odometry (default 0): 0=SURF, 1=SIFT + -bin Use binary odometry (FAST+BRIEF) + -icp Use ICP odometry + + -hz #.# Camera rate (default 0, 0 means as fast as the camera can) + -db "input.db" Use database instead of camera (recorded with rtabmap-dataRecorder) + -clouds # Maximum clouds shown (default 10, zero means inf) + -sec #.# Delay (seconds) before reading the database (if set) + + -in #.# Inliers maximum distance, features/ICP (default 0.005 m) + -max # Max features used for matching (default 0=inf) + -min # Minimum inliers to accept the transform (default 20) + -depth #.# Maximum features depth (default 5.0 m) + -i # RANSAC/ICP iterations (default 100) + -lu # Linear update (default 0.0 m) + -au # Angular update (default 0.0 radian) + -reset # Reset countdown (default 0 = disabled) + + -bin_brief_bytes # BRIEF bytes (default 32) + -bin_fast_thr # FAST threshold (default 30) + -bin_lsh Use nearest neighbor LSH (default brute force hamming) + + -d # ICP decimation (default 4) + -v # ICP voxel size (default 0.005) + -s # ICP samples (default 0, not used if voxel is set.) + -f #.# ICP fitness (default 0.01) + + -debug Log debug messages + +Examples: + odometryViewer -bow 0 SURF example + odometryViewer -bow 1 SIFT example + odometryViewer -bin -hz 10 FAST/BRIEF example + odometryViewer -icp -in 0.05 -i 30 ICP example +``` + +Using this database: [input.db](https://docs.google.com/uc?id=0B46akLGdg-uaUnowOFpkM0RTUEE), the four techniques are compared: + + * In order: SURF, SIFT, BRIEF/FAST and ICP + + ``` + ./rtabmap-odometryViewer -hz 10 -db input.db -bow 0 -clouds 0 + ./rtabmap-odometryViewer -hz 10 -db input.db -bow 1 -clouds 0 + ./rtabmap-odometryViewer -hz 10 -db input.db -bin -clouds 0 -in 0.005 -bin_brief_bytes 64 + ./rtabmap-odometryViewer -hz 10 -db input.db -icp -in 0.04 -v 0.02 -clouds 0 -f 1 -i 30 +``` + + [![[doc/Tools/database_viewer.png]]](http://www.youtube.com/watch?v=3xggFmS5-1s) + +## Data recorder +This tool can be used to record images from a webcam or an OpenNI camera (with depth) to RTAB-Map database format, which can be after used as input for RTAB-Map. + + ``` +$ rtabmap-dataRecorder +Usage: +dataRecorder [options] output.db +Options: + -hide Don't display the current cloud recorded. + -debug Set debug level for the logger. + -rate #.# Input rate Hz (default 0=inf) + -openni Use openni camera instead of the usb camera. +``` \ No newline at end of file From cf9dc2dfc857faa29ec5f1821641fa2d92a50270 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 23 Nov 2014 17:46:38 -0800 Subject: [PATCH 02/11] Updated Tools (markdown) --- Tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools.md b/Tools.md index 28f9329..5624c5f 100644 --- a/Tools.md +++ b/Tools.md @@ -61,7 +61,7 @@ Using this database: [input.db](https://docs.google.com/uc?id=0B46akLGdg-uaUnowO ./rtabmap-odometryViewer -hz 10 -db input.db -icp -in 0.04 -v 0.02 -clouds 0 -f 1 -i 30 ``` - [![[doc/Tools/database_viewer.png]]](http://www.youtube.com/watch?v=3xggFmS5-1s) + [![[doc/video_screenshots/odomcomparison.jpeg]]](http://www.youtube.com/watch?v=3xggFmS5-1s) ## Data recorder This tool can be used to record images from a webcam or an OpenNI camera (with depth) to RTAB-Map database format, which can be after used as input for RTAB-Map. From ba0d961ea9ab8419a2ab55a60d25a7fe0071f11c Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 23 Nov 2014 17:46:51 -0800 Subject: [PATCH 03/11] Updated Tools (markdown) --- Tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools.md b/Tools.md index 5624c5f..942540a 100644 --- a/Tools.md +++ b/Tools.md @@ -61,7 +61,7 @@ Using this database: [input.db](https://docs.google.com/uc?id=0B46akLGdg-uaUnowO ./rtabmap-odometryViewer -hz 10 -db input.db -icp -in 0.04 -v 0.02 -clouds 0 -f 1 -i 30 ``` - [![[doc/video_screenshots/odomcomparison.jpeg]]](http://www.youtube.com/watch?v=3xggFmS5-1s) + [[[doc/video_screenshots/odomcomparison.jpeg]]](http://www.youtube.com/watch?v=3xggFmS5-1s) ## Data recorder This tool can be used to record images from a webcam or an OpenNI camera (with depth) to RTAB-Map database format, which can be after used as input for RTAB-Map. From d274f39e75642c7bb8752531f61fd1c9adff9ba2 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 23 Nov 2014 17:47:02 -0800 Subject: [PATCH 04/11] Updated Tools (markdown) --- Tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools.md b/Tools.md index 942540a..cd390ea 100644 --- a/Tools.md +++ b/Tools.md @@ -61,7 +61,7 @@ Using this database: [input.db](https://docs.google.com/uc?id=0B46akLGdg-uaUnowO ./rtabmap-odometryViewer -hz 10 -db input.db -icp -in 0.04 -v 0.02 -clouds 0 -f 1 -i 30 ``` - [[[doc/video_screenshots/odomcomparison.jpeg]]](http://www.youtube.com/watch?v=3xggFmS5-1s) + [ [[doc/video_screenshots/odomcomparison.jpeg]] ](http://www.youtube.com/watch?v=3xggFmS5-1s) ## Data recorder This tool can be used to record images from a webcam or an OpenNI camera (with depth) to RTAB-Map database format, which can be after used as input for RTAB-Map. From fad0f05226af13936c41b5c013532cca1621fccb Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 23 Nov 2014 17:55:30 -0800 Subject: [PATCH 05/11] Updated _Sidebar (markdown) --- _Sidebar.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_Sidebar.md b/_Sidebar.md index 29cfe4b..3c561f0 100644 --- a/_Sidebar.md +++ b/_Sidebar.md @@ -9,4 +9,5 @@ * [Plot statistics](https://github.com/introlab/rtabmap/wiki/Plot-statistics) * [C++ RGB-D Mapping](https://github.com/introlab/rtabmap/wiki/Cplusplus-RGBD-Mapping) * [C++ Loop closure detection](https://github.com/introlab/rtabmap/wiki/Cplusplus-Loop-Closure-Detection) -* [Tools](https://github.com/introlab/rtabmap/wiki/Tools) \ No newline at end of file +* [Tools](https://github.com/introlab/rtabmap/wiki/Tools) +* [IROS 2014 Kinect Challenge](https://github.com/introlab/rtabmap/wiki/IROS-2014-Kinect-Challenge) \ No newline at end of file From cb70cc9e70a6f7417d395d609b5f09971c096571 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 23 Nov 2014 17:55:39 -0800 Subject: [PATCH 06/11] Updated _Sidebar (markdown) From 90a915119b56538cbb2f20628ca7b44265f0bfcc Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 23 Nov 2014 17:56:46 -0800 Subject: [PATCH 07/11] Updated _Sidebar (markdown) --- _Sidebar.md | 1 + 1 file changed, 1 insertion(+) diff --git a/_Sidebar.md b/_Sidebar.md index 3c561f0..3ab2576 100644 --- a/_Sidebar.md +++ b/_Sidebar.md @@ -9,5 +9,6 @@ * [Plot statistics](https://github.com/introlab/rtabmap/wiki/Plot-statistics) * [C++ RGB-D Mapping](https://github.com/introlab/rtabmap/wiki/Cplusplus-RGBD-Mapping) * [C++ Loop closure detection](https://github.com/introlab/rtabmap/wiki/Cplusplus-Loop-Closure-Detection) + * [ICP](https://github.com/introlab/rtabmap/wiki/ICP) * [Tools](https://github.com/introlab/rtabmap/wiki/Tools) * [IROS 2014 Kinect Challenge](https://github.com/introlab/rtabmap/wiki/IROS-2014-Kinect-Challenge) \ No newline at end of file From a74e0ffefed77e1aafb58687bf6843001c1fa7f5 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 23 Nov 2014 17:57:10 -0800 Subject: [PATCH 08/11] Updated _Sidebar (markdown) --- _Sidebar.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_Sidebar.md b/_Sidebar.md index 3ab2576..902142b 100644 --- a/_Sidebar.md +++ b/_Sidebar.md @@ -7,8 +7,8 @@ * [Loop closure detection](https://github.com/introlab/rtabmap/wiki/Loop-closure-detection) * [Benchmark](https://github.com/introlab/rtabmap/wiki/Benchmark) * [Plot statistics](https://github.com/introlab/rtabmap/wiki/Plot-statistics) + * [ICP](https://github.com/introlab/rtabmap/wiki/ICP) * [C++ RGB-D Mapping](https://github.com/introlab/rtabmap/wiki/Cplusplus-RGBD-Mapping) * [C++ Loop closure detection](https://github.com/introlab/rtabmap/wiki/Cplusplus-Loop-Closure-Detection) - * [ICP](https://github.com/introlab/rtabmap/wiki/ICP) * [Tools](https://github.com/introlab/rtabmap/wiki/Tools) * [IROS 2014 Kinect Challenge](https://github.com/introlab/rtabmap/wiki/IROS-2014-Kinect-Challenge) \ No newline at end of file From 53c7d15b48494844f088fd6bb1e3e57ffa4b4dae Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 23 Nov 2014 18:01:57 -0800 Subject: [PATCH 09/11] Updated Home (markdown) --- Home.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Home.md b/Home.md index 50cb721..c671f1a 100644 --- a/Home.md +++ b/Home.md @@ -1,6 +1,6 @@ Welcome to the rtabmap wiki! -The main sections are: +## The main sections * [Installation](https://github.com/introlab/rtabmap/wiki/Installation) * [Tutorials](https://github.com/introlab/rtabmap/wiki/Tutorials) * [Kinect mapping](https://github.com/introlab/rtabmap/wiki/Kinect-mapping) @@ -9,7 +9,13 @@ The main sections are: * [Loop closure detection](https://github.com/introlab/rtabmap/wiki/Loop-closure-detection) * [Benchmark](https://github.com/introlab/rtabmap/wiki/Benchmark) * [Plot statistics](https://github.com/introlab/rtabmap/wiki/Plot-statistics) + * [ICP](https://github.com/introlab/rtabmap/wiki/ICP) * [C++ RGB-D Mapping](https://github.com/introlab/rtabmap/wiki/Cplusplus-RGBD-Mapping) * [C++ Loop closure detection](https://github.com/introlab/rtabmap/wiki/Cplusplus-Loop-Closure-Detection) * [Tools](https://github.com/introlab/rtabmap/wiki/Tools) +* [IROS 2014 Kinect Challenge](https://github.com/introlab/rtabmap/wiki/IROS-2014-Kinect-Challenge) +## Home pages + * [Home page for RGB-D Mapping](http://introlab.github.io/rtabmap) + * [Home page for loop closure detection on IntRoLab](https://introlab.3it.usherbrooke.ca/mediawiki-introlab/index.php/RTAB-Map) + * [Home page on ROS.org](http://wiki.ros.org/rtabmap) \ No newline at end of file From 2cb7bddac36bc34cc2acfd47bdc3c550a41e304e Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 23 Nov 2014 18:09:27 -0800 Subject: [PATCH 10/11] Created ICP (markdown) --- ICP.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 ICP.md diff --git a/ICP.md b/ICP.md new file mode 100644 index 0000000..03d4e83 --- /dev/null +++ b/ICP.md @@ -0,0 +1,38 @@ +## Introduction + +In this page, I'll discuss about why ICP (Iterative Closest Point) is deactivated by default. For some cases, enabling ICP will increase precision of the loop closure and the visual odometry. However for some other cases, it will add difficult detectable errors. The next sections show two cases: where ICP helps to give better transformations and where ICP doesn't help at all, even increase the error. + +## A good case for ICP + +When a loop closure happens between two images, we compute the visual transformation using the corresponding visual words. When ICP is enabled, this transformation is used as a guess for the ICP algorithm. The image below shows this process. + 1. We have two corresponding images. + 2. We compute the visual transformation, the results show a little orientation error (see he first yellow circle) on the transformed clouds using this first guess. + 3. Using ICP, we refine this transformation using only geometric information. This orientation error is corrected (second yellow circle). +In this case, ICP increases precision. + + + +## A bad case for ICP + +In this case, we do the same: we compute a visual transformation to find a guess for the ICP. The process is shown in the image below. + 1. We have two corresponding images. + 2. We compute the visual transformation, the results show that the clouds of the screen are correctly aligned (first yellow circle). + 3. Using ICP, we refine this transformation using only geometric information. However, here ICP decreases the precision. What happens is that ICP tries to match as many corresponding points as it can. Here the background behind the screen has more points that the screen itself on the two scans. ICP will then align the clouds to maximize the correspondences on the background. The screen is then misaligned (second yellow circle). + + + +## Discussion +The ICP error on the second case is difficult to detect. For example, the euclidean fitness score (e.g., sum of squared distances from the source to the target) of the first case is 0.005312 and the second case is 0.002064. Generally, a fitness under 0.1 gives good results. However, in the second case, the fitness is even lower than in the first case, which makes this criterion not robust to detect such wrong cases. For this reason, ICP is disabled by default in RTAB-Map. + +You can try the examples above on the corresponding PCD files: +| First case | Second case | +| ---------- | ----------- | +| [old.pcd](https://raw.githubusercontent.com/wiki/introlab/rtabmap/doc/icp_error/ok/old.pcd) | [old.pcd](https://raw.githubusercontent.com/wiki/introlab/rtabmap/doc/icp_error/wrong/old.pcd) | +| [new.pcd](https://raw.githubusercontent.com/wiki/introlab/rtabmap/doc/icp_error/ok/new.pcd) | [new.pcd](https://raw.githubusercontent.com/wiki/introlab/rtabmap/doc/icp_error/wrong/new.pcd) | +| [icp.pcd](https://raw.githubusercontent.com/wiki/introlab/rtabmap/doc/icp_error/ok/icp.pcd) | [icp.pcd](https://raw.githubusercontent.com/wiki/introlab/rtabmap/doc/icp_error/wrong/icp.pcd) | + +``` + $ pcl_viewer old.pcd guess.pcd //see transform using visual transformation guess only + $ pcl_icp old.pcd guess.pcd + $ pcl_viewer old.pcd guess.pcd //see transform with icp +``` \ No newline at end of file From 6f19cfa3eeff5f66f8c6ac785d98601cdbe65caa Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 23 Nov 2014 18:10:46 -0800 Subject: [PATCH 11/11] Updated ICP (markdown) --- ICP.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ICP.md b/ICP.md index 03d4e83..9115ff4 100644 --- a/ICP.md +++ b/ICP.md @@ -25,6 +25,7 @@ In this case, we do the same: we compute a visual transformation to find a guess The ICP error on the second case is difficult to detect. For example, the euclidean fitness score (e.g., sum of squared distances from the source to the target) of the first case is 0.005312 and the second case is 0.002064. Generally, a fitness under 0.1 gives good results. However, in the second case, the fitness is even lower than in the first case, which makes this criterion not robust to detect such wrong cases. For this reason, ICP is disabled by default in RTAB-Map. You can try the examples above on the corresponding PCD files: + | First case | Second case | | ---------- | ----------- | | [old.pcd](https://raw.githubusercontent.com/wiki/introlab/rtabmap/doc/icp_error/ok/old.pcd) | [old.pcd](https://raw.githubusercontent.com/wiki/introlab/rtabmap/doc/icp_error/wrong/old.pcd) |