rtabmap icon indicating copy to clipboard operation
rtabmap copied to clipboard

getLastLocalizationPose() doesn't work with Images List

Open phat64 opened this issue 8 years ago • 1 comments

I modified the BOWMapping example. This example use a images list from a directory for detecting closure loop.

I used the same images/directory in the example.

I executed the program like that : ./bin/rtabmap-bow_mapping ./bin/data/samples/

and like that : ./bin/rtabmap-bow_mapping -l ./bin/data/samples/

But I have always a (0,0,0) position in the Transform of rtabmap.getLastLocalizationPose();

Does someone how to get the good transform(position+rotation) of each image ?

(If you can detect a closure loop, I think that you can know when I'm)

// start of my code
		auto& transform = rtabmap.getLastLocalizationPose();
		printf(" pos(%f %f %f)\n",transform.x(), transform.y(), transform.z());
// end of code
		++nextIndex;

		//Get next image
		data = camera.takeImage();
	}

phat64 avatar Jul 13 '18 01:07 phat64

bow_mapping example is purely appearance-based loop closure detection, there is no metric, no pose. It is normal that the returned pose is null. If you need poses, you should refer to rgbd_mapping example, where odometry should be provided.

cheers, Mathieu

matlabbe avatar Jul 13 '18 17:07 matlabbe