Skip to content

how to fix (or avoid) the situation where /map->/odom tf is not updated (/map->/odom tfが更新されない時の対処法) #8

Description

@Phkomukai

When the /emcl2_node tries to publish /map->/odom tf, sometimes the error "Lookup would require extrapolation into the future." occurs.
This error can be found on rqt_console , "Failed to subtract base to odom transform".

if this error occurs, /map->/odom tf almost never updates.

In order to avoid this situation, you may need to rewrite this line as below

tf_->transform(tmp_tf_stamped, odom_to_map, odom_frame_id_);

tf_->transform(tmp_tf_stamped, odom_to_map, odom_frame_id_, ros::Duration(1.0);

以下日本語
/emcl2_nodeが/map->/odom tfを更新する際、稀に内部で"Lookup would require extrapolation into the future." エラーを起こす事があります。
このエラーはrqt_consoleで"Failed to subtract base to odom transform"と表示されます。
(デフォルトの設定だとターミナル上には表示されません。)

このエラーが起こると /map->/odom tfは殆ど更新されなくなります。(ごく稀に更新されます。)

このエラーを修正・回避したい場合、以下のコードを変更する必要があります。

tf_->transform(tmp_tf_stamped, odom_to_map, odom_frame_id_);

tf_->transform(tmp_tf_stamped, odom_to_map, odom_frame_id_, ros::Duration(1.0);

tfが更新されない理由には他にもlaunchファイルの設定ミスやtopic名の違いなどもあり得ますが、最近このエラーで躓いたので後進の者のためにここに書き記しました。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions