1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ExtrapolationException: Lookup would require extrapolation Xs into the future. Requested time XX but the latest data is at time XX, when looking up transform from frame [hoge] to frame [hoge]

Last updated at Posted at 2023-08-23

遭遇した事例

  • 研究室がお盆休みで停電したとき、PCやロボット周りの主電源を落とすのを忘れた
    • (先生や諸先輩方にバレたら自主規制されてしまう大失態)
  • 研究で使用しているサービスロボットが動かなくなった
    • JointTrajectoryを介した制御が全くできなくなる
    • ロボットの姿勢(?)を取ろうとしたときに、表題にも記した以下のエラーを吐く
      • ExtrapolationException: Lookup would require extrapolation Xs into the future. Requested time XX but the latest data is at time XX, when looking up transform from frame [hoge] to frame [hoge]

原因

  • 停電した関係でロボットの中の時計が狂ってた(こっそりSSHで忍び込んで確認)
    • JSTにしてあったLocal TimeがUTCに戻ってた(JSTのままだった制御PCと噛み合わない)
      • 確認方法:timedatectl
    • そもそものRTC TIMEも狂ってた(多分)
      • 確認方法:同上

対処法1

  1. Local TimeをJSTに戻す
  2. 時間も合わせちゃう
    てことで以下を実行(stop, startでそれぞれpasswordを要求されるので1行ずつ実行する)
/etc/init.d/chrony stop
sudo ntpdate ntp.nict.jp
/etc/init.d/chrony start

対処法2

import tf2_ros
tf_buffer = tf2_ros.Buffer()
tf_listener = tf2_ros.TransformListener(tf_buffer)
tf_buffer.clear()

TFのバッファをリセットするコード。こっちのほうが確実?

参考文献

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?