trapezoidal accepts the zero-blend velocity boundary but returns NaN at the initial sample
维护者通常 1 天内回复
评估
调研方向
Start by reading TrapezoidalProfile.__init__ and the evaluation logic used by trapezoidal, then run the reproduction with V=1.0 and the stated sample times. Check how the zero-duration blend boundary is represented and how the initial sample is evaluated. Done means the accepted boundary produces finite trajectory arrays, or is explicitly rejected, with tests covering both move directions.
由索引模型根据 Issue 内容生成。
描述
Reproduction
import numpy as np
from roboticstoolbox import trapezoidal
trajectory = trapezoidal(0.0, 1.0, np.array([0.0, 0.5, 1.0]), V=1.0)
print(trajectory.q)
print(trajectory.qd)
print(trajectory.qdd)
On current main 879fb363580840e19ee70b6b175e8cd3543e2b38 this prints:
[nan 0.5 1. ]
[nan 1. 1. ]
[inf 0. 0. ]
The accepted lower boundary abs(V) == abs(qf-q0)/T gives tb == 0; TrapezoidalProfile.__init__ divides by tb, and evaluating the initial blend multiplies that infinite acceleration by zero. Reversing the move reproduces the same non-finite initial sample. Controls at V=1.5 and V=2.0 return finite arrays.
Expected: handle the accepted boundary with a defined finite profile, or reject it explicitly if zero-duration blends are unsupported, rather than returning NaN/inf.
Reproduced with the normal source-package import on Linux, Python 3.12.14, NumPy 2.3.5 and SciPy 1.17.0. No robot hardware was used. This is separate from the empty-phase plotting fix in #910; filed following the request there. Searches for trapezoidal with blend and NaN found no existing issue.
- 主要语言
- C++
- 星标
- 3.6k
- 派生
- 650
- 平均合并
- 14 小时 6 分钟
- 30 天内合并 PR
- 139
环境准备
- 没有 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 天内回复
-
Integer control callbacks lose fractional vehicle limits and stop motion可能已有人在做 @Elon-Jiang 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 20/100
petercorke/robotics-toolbox-python#936 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
petercorke/robotics-toolbox-python#903 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Backend registry: single name → constructor dispatch可能已有人在做 @petercorke 于 16 天前认领。 未关闭enhancement
petercorke/robotics-toolbox-python#902 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Speed up the coverage job (about 25 minutes since coverage became real)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭tech-debt
难度 4/5 1-2 天 新手友好度 55/100
petercorke/robotics-toolbox-python#898 · 1 条评论 ·
维护者通常 1 天内回复
查看 petercorke/robotics-toolbox-python 的全部 Issue
相似的 Issue
-
area:qmc bug
难度 2/5 1-3 小时 新手友好度 69/100
维护者通常 3 天内回复
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 74/100
ASGC-Game-Jam/asgc-gamejam-2026#563 ·
维护者通常 1 天内回复
-
area/ysql kind/bug priority/medium status/awaiting-triage
难度 2/5 1-3 小时 新手友好度 78/100
yugabyte/yugabyte-db#37523 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
-
难度 2/5 1-3 小时 新手友好度 62/100
Cockatrice/Cockatrice#7896 ·
维护者通常 1 天内回复