Re: Losing odometry when doing fixed point scanning

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Losing-odometry-when-doing-fixed-point-scanning-tp4336p4519.html

Hi,

I think you are close to have something working. I think the low number of inliers is mainly because of the not enough accurate local transforms. I am not sure how the pattern on the floor should look like, but it seems awkward from the single assembled scan:


The rectangles are not all perfectly aligned, this will make extracting visual features with a lot more error, then difficult to match if the geometry (distance between same visual features) between scans changes.

The code I tried:
	ParametersMap detectParams;
	detectParams.insert(ParametersPair(Parameters::kVisFeatureType(), "0")); // SURF feature for example
	detectParams.insert(ParametersPair(Parameters::kVisMaxFeatures(), "24000"));
	detectParams.insert(ParametersPair(Parameters::kVisEstimationType(), "0")); // should be 0 for multi cameras
	detectParams.insert(ParametersPair(Parameters::kVisInlierDistance(), "0.1"));
	detectParams.insert(ParametersPair(Parameters::kKpDetectorStrategy(), "0")); // use same features for loop closure detection than for motion estimation (SURF here)
	detectParams.insert(ParametersPair(Parameters::kSURFHessianThreshold(), "100"));
	detectParams.insert(ParametersPair(Parameters::kRtabmapLoopThr(), "0"));
	detectParams.insert(ParametersPair(Parameters::kRGBDOptimizeMaxError(), "0"));

	DBReader reader("/home/mathieu/Downloads/multicamera2_0.1_4.db");
	reader.init();

	Rtabmap rtabmap;
	rtabmap.init(detectParams, "test.db");

	SensorData data = reader.takeImage();
	rtabmap.process(data, Transform::getIdentity());
	rtabmap.triggerNewMap();
	data = reader.takeImage();
	rtabmap.process(data, Transform::getIdentity());

	rtabmap.close();

It fails to find enough inliers. If I increase "Vis/InlierDistance", it will accept some transforms but they are very wrong. Having better aligned scans will help to have more inliers with low "Vis/InlierDistance", thus having good motion estimation.

cheers,
Mathieu