Re: RGBD SLAM and then RGB Localization
Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/RGBD-SLAM-and-then-RGB-Localization-tp489p495.html
Assuming that you have a map created from a Kinect run. Then, you use a webcam to localize in the 3D map. You can't do it with with the code as is.
However, it is doable. Two options:
1) Load the database, use OdometryMono with a calibrated webcam. BUT, the problem is that OdometryMono will not have any idea of the
scale of the 3D map if it runs on its side (scale initialized in the first phase of OdometryMono). The. Maybe it would be possible to synchronize the scale of the odometry with the one used in the map, like changing the initialization stage of OdometryMono with a known pattern for which the 3D coordinates of the object are known (using OpenCV cv::solvePnP() like calibrating with a chessboard). You would have the scale directly. Howerver, if you move the camera outside the known pattern, the scale will still change over time. Well, OdometryMono is very experimental and the scale may change rapidly outside the known pattern (when new 3D points are added to local map). I would go with the second option if you just want to localize (without mapping) in a 3D map.
2) Initialize the local map of OdometryMono with the whole map contained in the database, then use only the PnP localization part of the odometry without adding new points to the local map. The position of the camera will be always computed from the know 3D map, so you can't move the camera outside that region but the scale will always be known. This may be cool for small areas though, I could check more deeply when I will have some time (I opened an issue:
https://github.com/introlab/rtabmap/issues/27).
cheers,
Mathieu