Timer callbacks can be delayed when using simulation time
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
タイマーのクロックジャンプハンドラーと、executor による /clock サブスクリプションの処理から始め、次に issue で説明されている SingleThreadedExecutor と EventsExecutor の経路を比較します。TimeSource とタイマーが guard conditions とどのように相互作用するかを追跡します。シミュレーション時間における意図した callback の順序が定義され、テストでカバーされ、かつ指定された executor 構成を壊していなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
This is a breakout of the issue described in https://github.com/ros2/rclcpp/issues/2532#issuecomment-2125015383.
Timer processing when using simulation time is a two step process (e.g. requires two waits of the wait set), so it's possible that subscription callbacks can get called before the timer callback when using simulation time. As timers have higher priority than subscriptions (as documented in the Scheduling semantics), one may expect that timers driven via the /clock topic would also have that same higher-priority and expect that timer callbacks driven by the /clock topic would execute before subscription callbacks for messages that were transmitted after the /clock message. Because of the two-step process, this is not necessarily the case.
A potential change to consider would be to have the clock jump handler registered by the timer call the timer callback directly instead of triggering the guard condition. This would only be applicable if the clock thread has been disabled or the default callback group has been configured to be reentrant (though that may be confusing when using the SingleThreadedExecutor, but would actually be consistent with the execute_timers_separate_thread option to the EventsExecutor).
It should be noted that due to the issue described in https://github.com/ros2/rclcpp/issues/2532, an implementation of the above suggestion would likely require that the executor have an explicit processing step for the /clock topic subscription before processing other subscriptions to ensure that the timers are executed before the other subscriptions, Prior to Jazzy, the /clock subscription is always handled first because it was internally registered by the TimeSource before any other application subscriptions.
- 主要言語
- C++
- スター
- 829
- フォーク
- 587
- 平均マージ
- 4日 6時間
- マージ済み PR(30日)
- 30
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ros2/rclcpp のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
Memory grows per callback group created and destroyed on long lived nodes対応中かも @jwallace42 が 1 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
ros2/rclcpp#3428 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
removing and immediately re-adding a node to the EventsCBGExecutor leaves its entities unregistered対応中かも @skyegalaxy が 10 日前に担当しました。 オープンbug
メンテナーはふだん 1 日以内に返信
-
[Humble] Removing a node with more than one auto-added callback group leaves a dangling guard condition in the executor対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
EchoTools/nevr-runtime#2912 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
category:port-update
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
bug-unconfirmed
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
libc++
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
llvm/llvm-project#246508 ·
メンテナーはふだん 1 日以内に返信