Re: odom_sensor_sync

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/odom-sensor-sync-tp10116p10121.html

Based on the current code:

localTransform = baselink@imageStamp -> camlink@imageStamp;
sensorT = baselink@imageStamp -> baselink@odomStamp;

so that final localTransform is

localTransform = sensorT * localTransform;
or
localTransform = baselink@imageStamp -> baselink@odomStamp * baselink@imageStamp -> camlink@imageStamp;


Based on the original code, it was:

odomT = odom -> baselink@odomStamp;
localTransform = baselink -> camlink@imageStamp;
sensorT = odom -> baselink@imageStamp;

localTransform = odomT.inv() * sensorT * localTransform
or
localTransform = baselink@odomStamp -> odom * odom -> baselink@imageStamp * baselink@imageStamp -> camlink@imageStamp;
or with new code it would translate to:
localTransform = baselink@odomStamp -> baselink@imageStamp * baselink@imageStamp -> camlink@imageStamp;

with odomStamp and stamp inverted like you pointed out here. That commit indeed broke it.

I renamed the getTransform() with fixed frame to getMovingTransform() and changed the order of the input stamps in that commit. So it is inverting the odomStamp and odom implicitly.

I tested odom_sensor_sync in simulation with both images or scans not at the same rate than odom, and it seems to work correctly now.

Thanks to have reported this!
Mathieu