Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug pr2 narrow stereo camera time stamp mismatch #51

Open
HiroIshida opened this issue Dec 28, 2023 · 6 comments
Open

debug pr2 narrow stereo camera time stamp mismatch #51

HiroIshida opened this issue Dec 28, 2023 · 6 comments

Comments

@HiroIshida
Copy link
Owner

HiroIshida commented Dec 28, 2023

これのせいでTimeSynchronizerでいっこうにcbがよばれない. calib できない
https://github.com/HiroIshida/snippets/blob/master/ros/tools/debug/topic_latency.py

For narrow stereo
image
the diff value is

[-1.2240088   0.61211658  0.61188054  0.61187649  0.61187935 -1.22401214
 -1.22400904  0.61212635  0.61188221  0.61188459  0.61188078 -1.22400141
 -1.2240026   0.61212659  0.61213899  0.61188936  0.6118834  -1.22399664
 -1.22399664  0.61212516  0.61213708  0.61189508  0.61188221 -1.22399926
 -1.22399998  0.61212516  0.61212564  0.61188412  0.61188483]

For wide stereo
image
the diff value is

[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0.]
@HiroIshida
Copy link
Owner Author

再起動してやりなおすと, ちょっとずれ幅が変わった?
image

[-0.23785758 -0.23785281 -0.23810458  1.59778357 -0.23785567 -0.23785686
 -0.23786926 -0.23783851 -0.23785377  1.59778237 -0.23785377 -0.23785472
 -0.23785377 -0.23785949 -0.23784947  1.59778166 -0.23785758 -0.23785663
 -0.23785591 -0.23785901 -0.23785639  1.59777761 -0.2381053  -0.23785782
 -0.23785567 -0.23785877 -0.23786116  1.598037   -0.23808932]

でもあいかわらずずれている.

今度はwideもずれはじめた. ..
image
diff

[0.13616371 0.13592243 0.13591218 0.13592196 0.13616252 0.13615775
 0.13617587 0.13591647 0.13591313 0.13592005 0.13616824 0.13616419
 0.13616848 0.13592935 0.1359055  0.13592362 0.13616252 0.13615417
 0.13616991 0.1359179  0.13590908 0.13592291 0.13592982 0.13616419
 0.13616943 0.13592124 0.13591743 0.13592076 0.13590622]

@HiroIshida
Copy link
Owner Author

HiroIshida commented Dec 28, 2023

tempな解決策としては, camera calibrationのときに --approx=0.3としてapprox filterを使う. ずれがでかい場合には, pr2を再起動して, ずれが少なくなるまでまつ. => うまくいかない...
何回も再起動していると, いつか両方0000になるのでは,

@HiroIshida
Copy link
Owner Author

HiroIshida commented Dec 28, 2023

diagnosticsみるとこんなエラーがでてる
image
image

@HiroIshida
Copy link
Owner Author

roswiki https://wiki.ros.org/wge100_camera をみると

The timestamps returned by the wge100_camera_node are with respect to the end of the exposure. The timestamps can be produced in one of two ways:

If the camera is externally triggered, the driver expects timestamps to be provided on a roslib/Header topic. The topic the camera subscribes to is defined by the ~trig_timestamp_topic parameter. The driver then attempts to match timestamps with image arrival times.

If the camera is internally triggered, the driver uses the arrival time of the first packet in the message, offset by first_packet_offset as an estimate of the end of the exposure. These estimates are then filtered based on the known frame rate to get a more accurate estimate with less jitter.

と書いてある. また

<~trig_timestamp_topic> (roslib/Header)
In external mode only: topic on which the wge100_camera_node gets timestamps at which the camera was triggered. The node matches these timestamps to incoming images and uses them to timestamp the frame. The name of this
topic is extracted from the ~trig_timestamp_topic parameter.

のよう. 実際
image
のようにrealtimeloopがだす, triggerをうけている. だとすると, このtriggerのTSがそのままheaderに入っているはずで同期がずれることはないのでは...

@HiroIshida
Copy link
Owner Author

ソースコードはこちら https://github.com/ros-drivers/wge100_driver

@HiroIshida
Copy link
Owner Author

robot stop / start繰り返していても, 片方は0.000になるが, 両方はならない. calibする目的のためだったら, 片方を0.000に揃えた状態にしてcalibして, またrobot stop/startとして揃えて...というのをすればいいだけでは?
ダメ押しで電源から再起動してみるか.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant