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

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

Open
Phkomukai opened this issue Jan 8, 2024 · 0 comments

Comments

@Phkomukai
Copy link

Phkomukai commented Jan 8, 2024

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名の違いなどもあり得ますが、最近このエラーで躓いたので後進の者のためにここに書き記しました。

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