Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

plt.pause(0) waits for ever: PoseGraph.plot_scan(pause=0) and Vehicle animation may hang

オープン 初心者向け
#876 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@huxiaoyi-ovo がすでに取り組んでいます。

2026年10月25日 から。

  • #896 @huxiaoyi-ovo による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
matplotlib, python

調査の方向性

mobile/PoseGraph.py の PoseGraph.plot_scan と mobile/Vehicle.py の _refresh_animation_frame を読み、呼び出し元の853行目と1841行目を確認して、dt がゼロになり得るか判断してください。PlannerBase.animation_frame の処理と、#875 の tests/test_step_dt.py にあるタイムアウトテストの方法を比較してください。ポーズ値がゼロの場合のテストを追加し、該当する呼び出しがハングせずに戻るか例外を発生させることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

bug

plt.pause(0) does not return: Matplotlib treats a timeout of zero as "wait until the event loop is stopped", so it blocks for ever, with no message. PyPlot.step(0) and PyPlot2.step(0) did this and now raise ValueError (#875). Other places pass a caller's value straight to plt.pause:

  • PoseGraph.plot_scan(n, pause=0) (mobile/PoseGraph.py): plt.pause(pause) with no guard, pause is an argument and defaults to 1. Needs a guard, or a ValueError, as in #875.
  • Vehicle animation (mobile/Vehicle.py, _refresh_animation_frame(fig, dt, pause)): ends with plt.pause(dt); check whether dt can be zero from the callers (lines 853 and 1841) and guard it if so.

Not affected: PlannerBase.animation_frame already tests pause > 0, and the others pass a constant.

I believe the first two hang the same way but have not run them. A test should use a timeout so that a regression fails instead of hanging (see tests/test_step_dt.py in #875).

主要言語
C++
スター
3.6k
フォーク
645
平均マージ
1日 8時間
マージ済み PR(30日)
145

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

petercorke/robotics-toolbox-python のほかの issue

petercorke/robotics-toolbox-python の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。