Please select Into the mobile phone version | Continue to access the computer ver.
Close
You need to log in before you can reply       Login | Register now

[Help] Sync Image and IMU

Author: danhennage 2016-7-2 08:02
4 4210
I'm trying to sync _image_data with _imu. Both contain frame_index and time_stamp fields. The comments in DJI_Guidance.h for _imu indicate these values are "correspondent" to the image captured. And indeed there are matching _imu messages for each _image_data message (most of the time).

I was expectimg _imu messages to come first since they should be much faster to process than an image. So my algorithm would be to cache _imu messages until an image comes, then find the matching _imu message based upon the frame_index (or time_stamp).

Instead I'm seeing the _image_data messages come in first and then the mtaching _imu message comes in 10s of milliseconds later. That isn't so great since it introduces unwanted latency into the system.

Is this the expected behavior? Or am i misinterpreting the meaning of frame_index and time_stamp?

Thanks.
Reply
Replies
Scanifly
Hi @danhennage, were you ever to find an answer to this?
2016-7-12 06:59
danhennage
Scanifly Posted at 2016-7-12 06:59
Hi @danhennage, were you ever to find an answer to this?

No, still waiting.
2016-7-12 12:10
danhennage
I've attached a version of GuidanceNode.cpp that modifies the printf output somewhat to show the syncing issue. If you run it and grep for "index" you'll see something like this:

1468884791.036 img frame index: 3303, stamp: 6453
1468884791.036 imu frame index: 3293, stamp: 6401
1468884791.036 ult frame index: 3302, stamp: 6401
1468884791.037 obs frame index: 3303, stamp: 6453
1468884791.066 imu frame index: 3303, stamp: 6453
1468884791.066 ult frame index: 3307, stamp: 6453
1468884791.085 vel frame index: 3330, stamp: 15600
1468884791.086 obs frame index: 3313, stamp: 6503
1468884791.146 img frame index: 3323, stamp: 6551
1468884791.146 imu frame index: 3313, stamp: 6503
1468884791.146 ult frame index: 3318, stamp: 6503
1468884791.146 obs frame index: 3323, stamp: 6551
1468884791.166 imu frame index: 3323, stamp: 6551
1468884791.166 ult frame index: 3327, stamp: 6551
1468884791.184 vel frame index: 3351, stamp: 15706
1468884791.184 obs frame index: 3333, stamp: 6604
1468884791.241 img frame index: 3343, stamp: 6654
1468884791.242 imu frame index: 3333, stamp: 6604
1468884791.242 ult frame index: 3337, stamp: 6604
1468884791.242 obs frame index: 3343, stamp: 6654
1468884791.266 imu frame index: 3343, stamp: 6654

As you can see, the imu frame index 3303 (1468884791.066) comes in 30ms after the image (1468884791.036).

This post contains more resources

You need to Login Before they can download or view, Not have an account?Register now

x
2016-7-19 08:22
wuyuwei
danhennage Posted at 2016-7-19 08:22
I've attached a version of GuidanceNode.cpp that modifies the printf output somewhat to show the syn ...


Hi  danhennage,
  Your printf info looks normal.  Image and IMU are sent to PC asynchronously ,  it need some time to cost for image data usb transmission, so it cause you get the image and imu with same index in different time.
2016-7-20 15:25
You need to log in before you can reply Login | Register now

Quick Reply Back to top Back to list
Quick Reply Back to top Back to list