You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
plt.pause(0) waits for ever: PoseGraph.plot_scan(pause=0) and Vehicle animation may hang #876
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:
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).
I'd like to take this issue. I'll fix the zero-duration pause handling in PoseGraph.plot_scan() and Vehicle animation, following the behaviour established in #875.
I'll add focused regression tests covering zero/negative values and non-blocking animation, and verify the changes against CI.
I'll use ChatGPT (GPT-6) for assistance with code analysis and testing, with appropriate attribution in the PR and commits.
Activity
huxiaoyi-ovo commentedon Oct 22, 2026
Hi @petercorke,
I'd like to take this issue. I'll fix the zero-duration pause handling in
PoseGraph.plot_scan()and Vehicle animation, following the behaviour established in #875.I'll add focused regression tests covering zero/negative values and non-blocking animation, and verify the changes against CI.
I'll use ChatGPT (GPT-6) for assistance with code analysis and testing, with appropriate attribution in the PR and commits.
Thanks!