Kinect v2 Optimal Settings and Expected Localization Error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Kinect v2 Optimal Settings and Expected Localization Error

mjedmonds
Hi,

I've been trying to get rtabmap working accurately with a Kinect v2. Here's my target scenario:
1) Map the room in mapping mode
2) Use the localization mode with the precomputed map for accurate odometry (e.g. traveling around the room, returning to the starting location within ~5cm of of the original location.

I have a couple of questions:
1) Is this a reasonable expectation to achieve?
2) Would localization mode perform more accurately with the incremental memory on?

I've attached my launch files (you can set the mapping arg to switch between localization and mapping mode.

It's worth noting I am using a calibrated kinect v2 (calibrated with iai_kinect)

Here's a video of accuracy I'm achieving. You can see the periodic jump to completely different portions of the map. I'm perplexed by this behavior as I don't think it's expected. If there are any improvements to mapping that I should perform please let me know.

https://youtu.be/5bUPmFpFOko

Here are my two launch files (you can ignore the mobile base stuff). They contain the parameters and launch configuration. Any improvements would be highly welcomed!

demo_bringup.launch
rtabmap_vo.launch

Thanks,
Mark
Reply | Threaded
Open this post in threaded view
|

Re: Kinect v2 Optimal Settings and Expected Localization Error

matlabbe
Administrator
Hi,

1) It is possible to do. However, with a system with only a camera (no laser), you should map the environment in many directions so that relocalization can happen more often (e.g., the robot cannot relocalize in an environment where the images have been taken in reverse direction).
2) No, the same algorithm is used for loop closure detection (incremental mode) and localization.

For your video, you may want to show TF on RVIZ so we can see better if the jumps happen on relocation or if it is an odometry error.

For the first case, when rtabmap relocalizes on the map, the robot may "jump" to the localized place. So jumps (small or big) are okay if they relocalize the robot correctly against the map/environment. At 2:05, there is a big jump, but I think this one may be a wrong localization. You can tune these parameters to increase the thresholds at which the relocation is accepted:
<node name="rtabmap" type="rtabmap" pkg="rtabmap_ros">
...
<!-- [0, 1] the higher it is, the less loop closures will be detected but less wrong loop closures will be also detected -->
<param name="Rtabmap/LoopThr" type="string" value="0.11"/> 

<!-- Minimum visual correspondences to accept a loop closure -->
<param name="LccBow/MinInliers" type="string" value="10"/> 
</node>
Setting these parameters too high will disable the ability of rtabmap to relocalize. Maybe try "Rtabmap/LoopThr" up to 0.5 and "LccBow/MinInliers" up to 20.

cheers