Imu - Camera calibration from highres imu and images

Although the question has some extra stuffs, I would like to ask here as it relates to pixhawk and px4 somehow and there may be some people who have been doing this. I am basically calibrating the imu-camera calibration and input it to the VIORB ( visual inertial ORB-SLAM). The code I am using is here:

I need to provide the imu-camera calibration parameters, for that I need to get the syncronized image and imu data saved to a file. currently I am getting images at 30fps and IMU data from pixhawk at 30fps. And I calibrate camera imu system using kaliber:

But once I calibrate the data I got and input the values to the VIORB, I get negative scale. So if anyone has done these things, it would be great help if you guys can help me how to get the syncronized data from camera and imu as well as the imu-camera calibration and using them for scale ambuiguity in monocular SLAM.

Thank you.
Dharma KC

@bresch: Could you please look into this question. Thank you.