I have enabled the marker detection (Aruco Markers) and I have faced some strange situations:
(1) Sometimes I see in rtabmap-viz "landmark rejected". What does it mean? I know that for LC it means theat the highest hypothesis was rejected because a transformation could not be found (with enough inliers), but I don't know in case of landmarks how it works.
(2) I have "discovered" that the graph published in ROS, is equal to the one visualized in rtabmap.db when "Iterative optimization" box is disabled. Normally the graph with and without "Iterative optimization" box enabled looks almost the same, but when I use markers there is really a difference. I also tried to move the slider to zero, and the graph looked even better. Can you explain a little bit what this "iterative optimization" is? I thought that the slider could be equal to the Optimizer/Iterations parameter, which is by default 20 (at least when using GTSAM, which is my case), so I would expect that online rtabmap (also when using ROS) performs those iterations when optimizing. However, as I see that what is in the database is not equal to what is in ROS, I feel I am still missing something.
(3) I have realized that the resulting graph is worse than without landmarks. I have tried to set higher variances for the markers (specially for orientation) and also enable robust optimization with Vertigo, and then I get similar results than without markers, when I would expect a significant improve. Have you experienced significant improve when using markers?
1) A landmark could be rejected if it deforms too much the graph.
2) When the slider on left (at iteration 0), this is the graph with odometry only (no optimization). Checking or not iterative checkbox should give similar results, unless covariances are too large and many solutions are valid (many local minimum). In ros, it is indeed the non-iterative version that is applied. The iterative version is to extract graphes after each iteration step, to show them with the slider in dbviewer.
3) Can you share the database? How the landmarks are computed? internally in rtabmap or externally? If externally, the scale of the landmark should be carefully set to avoid detecting them farther or closer than reallity, which will add more error in the map.
3) Landmarks were computed internally. I am using the Marker/Length parameter to set the scale (The value is 7 cm, I measured it and it is quite exact). I did some experiments knowing the ground truth of the markers and camera, and I saw that marker error for the created rtabmap links is around 10 cm, and 5 deg. However, I do get some nodes where the position error increases up to 60 cm, and angle error is 45 deg. I solved the issue by setting Marker/MaxRange to 2 m, the Vertigo robust optimization and increasing the default VarianceLinear and Variance Angular. Then the results seem fine.