Hi,
It is unlikely that map->odom is still exactly Identity transform after a relocalization unless we are in a simulated environment with perfect sensor readings or map optimization is done from the end of the graph (RGBD/OptimizeFromGraphEnd=true). You can know when a relocalization happens with
rtabmap_ros/Info message if loopClosureId field is non zero:
$ rostopic echo /rtabmap/info/loopClosureId
0
---
0
---
0
---
14 <---- relocalization
---
cheers,
Mathieu