plt.pause(0) waits for ever: PoseGraph.plot_scan(pause=0) and Vehicle animation may hang
维护者通常 1 天内回复
评估
- 难度
- 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 内容生成。
描述
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,pauseis an argument and defaults to 1. Needs a guard, or aValueError, as in #875. -
Vehicleanimation (mobile/Vehicle.py,_refresh_animation_frame(fig, dt, pause)): ends withplt.pause(dt); check whetherdtcan 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 小时
- 30 天内合并 PR
- 145
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
petercorke/robotics-toolbox-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
petercorke/robotics-toolbox-python#709 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
petercorke/robotics-toolbox-python#903 · 1 条评论 ·
维护者通常 1 天内回复
-
Backend registry: single name → constructor dispatch可能已有人在做 @petercorke 今天认领。 未关闭enhancement
petercorke/robotics-toolbox-python#902 · 已指派 1 人 ·
维护者通常 1 天内回复
-
tech-debt
难度 4/5 1-2 天 新手友好度 55/100
petercorke/robotics-toolbox-python#898 ·
维护者通常 1 天内回复
-
LatticePlanner: integer headings, and motion primitives with finer turn steps (design first)可能已有人在做 @kVinsom 于 3 天前认领。 未关闭enhancement help wanted
难度 5/5 一周以上 新手友好度 25/100
petercorke/robotics-toolbox-python#895 · 2 条评论 ·
维护者通常 1 天内回复
查看 petercorke/robotics-toolbox-python 的全部 Issue
相似的 Issue
-
[Bug] [Go] Ack returns nil when the server answers with a non-OK status可能已有人在做 @leizhiyuan 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
apache/rocketmq-clients#1465 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
KhronosGroup/Vulkan-Tutorial#534 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 2 天内回复
-
bug IO
难度 2/5 1-3 小时 新手友好度 65/100
MrNeRF/LichtFeld-Studio#3824 ·
维护者通常 1 天内回复
-
pnnx: manual tanh GELU fusion loses the approximation mode可能已有人在做 @ktz03 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
Tencent/ncnn#7175 · 1 个 reaction ·
维护者通常 1 天内回复