[Bug]: manipulability reverses start and end when selecting a robot subchain
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 76/100
调研方向
找到 robot wrapper 的 manipulability 方法,并检查它如何将 start 和 end 转发给 self.ets;issue 指出了参数顺序颠倒的问题。针对显式默认 end、仅 end、仅 start 以及两端都指定的子链,添加有针对性的检查,并使用报告中的 Panda 示例和预期值。选定链的结果与 jacob0 一致,且显式默认调用与隐式调用结果相同,即为完成。
由索引模型根据 Issue 内容生成。
描述
RTB version
1.5.0, source main cee0023535988e4ae9490c81d639a46f2311b8fd; spatialmath-python 1.1.19; NumPy 2.5.5; native _fknm_c available
Python version
3.12.14
Operating system
Linux
Expected behavior
Selecting start and end should use the same kinematic chain as jacob0 with the same arguments. Supplying the default end explicitly should also agree with leaving it implicit. For the configuration below, the inverse-condition measure for panda_hand should be approximately 0.09476812042044401. For the subchain from panda_link2 to panda_link6, the minimum singular value should be approximately 0.175997031437505.
Actual behavior
Explicit end="panda_hand" raises ValueError: cond is not defined on empty arrays, whereas the default-end call and the measure computed from the selected Jacobian agree. Selecting panda_link2 to panda_link6 returns approximately 0.27532097160945784 instead of 0.175997031437505.
The robot wrapper builds its sequence with self.ets(end, start), but the sequence API takes start first and end second. This chooses a different chain (or a joint-free chain for an explicitly selected default end). The default call with both arguments omitted is unaffected. This was reproduced with the compiled backend on the source revision above. A focused fix would correct argument forwarding and add controls for explicit defaults, end-only, start-only, and two-ended subchains, without changing the manipulability formulas or public API.
Minimal reproducible example
import numpy as np
import roboticstoolbox as rtb
panda = rtb.models.Panda()
q = np.array([0.3, -0.5, 0.2, -1.8, -0.4, 1.4, 0.6])
selection = dict(start="panda_link2", end="panda_link6")
J = panda.jacob0(q, **selection)
print(panda.manipulability(J=J, method="minsingular"))
print(panda.manipulability(q, method="minsingular", **selection))
# Expected both: 0.175997031437505
# Actual second: 0.27532097160945784
print(panda.manipulability(q, method="invcondition"))
# 0.09476812042044401
print(panda.manipulability(q, end="panda_hand", method="invcondition"))
# ValueError: cond is not defined on empty arrays
- 主要语言
- C++
- 星标
- 3.6k
- 派生
- 652
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 92
环境准备
- 没有 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 天内回复
-
JupyterLite: unpin the Pyodide kernel (Safari 27 has JSPI), add the unsuitable-browser message, adopt spatialmath-python 1.1.19可能已有人在做 @petercorke 今天认领。 未关闭
petercorke/robotics-toolbox-python#941 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Integer control callbacks lose fractional vehicle limits and stop motion可能已有人在做 @Elon-Jiang 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 20/100
petercorke/robotics-toolbox-python#936 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
petercorke/robotics-toolbox-python#903 · 3 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Backend registry: single name → constructor dispatch可能已有人在做 @petercorke 于 22 天前认领。 未关闭enhancement
petercorke/robotics-toolbox-python#902 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 petercorke/robotics-toolbox-python 的全部 Issue
相似的 Issue
-
Needs: Author Feedback Needs: Repro
难度 2/5 1-3 小时 新手友好度 82/100
react/react-native#60059 · 1 条评论 ·
维护者通常 2 天内回复
-
area:build bug
难度 1/5 1 小时以内 新手友好度 90/100
NatronGitHub/openfx-arena#71 ·
维护者通常 1 天内回复
-
upstream-blocked
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
ROCm/FastFlowLM#1057 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
NatronGitHub/openfx-gmic#45 ·
维护者通常 1 天内回复