URDF.Panda() has no inertial data -- robot_descriptions alternative exists but has a collision-query performance cost
维护者通常 2 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- python
- 领域
- performance, robotics
调研方向
首先阅读 URDF/Panda.py 和 URDF/Frankie.py,然后将 robot_descriptions 中的 Panda 与 rtb-data/rtbdata/xacro/qut_frankie_description/robots/panda_arm_hand.urdf.xacro 进行比较。确认模型在使用 vendored 胶囊碰撞形状的同时保留真实的惯性数据,并在认为工作完成之前检查非零动力学和碰撞查询的性能。
由索引模型根据 Issue 内容生成。
描述
The gap
rtb.models.URDF.Panda() loads RTB's own bundled qut_frankie_description/robots/panda_arm_hand.urdf.xacro (rtb-data/rtbdata/xacro/qut_frankie_description/). Checked at the raw file level: zero <inertial> tags anywhere in the whole package -- every link has <visual>/<collision> only. robot.rne()/robot.inertia()/robot.coriolis()/robot.gravload() are all silently zero for every configuration, not because of an algorithm bug (see #636/#684) but because the underlying URDF genuinely carries no mass data. Confirmed on current main.
This is the URDF-model twin of #278 (closed 2022, same complaint about DH.Panda() at the time -- fixed later that year by porting values from the MATLAB toolbox's mdl_panda.m, see DH/Panda.py's git blame, commit 217d69c9, PR #294 by @askuric). Nobody has filed the equivalent report for the URDF model.
Don't just port DH/Panda.py's values across -- DH r/I are expressed in the DH link frame convention, which doesn't in general coincide with the URDF joint frame. Copying the numbers without also transforming them would produce plausible-looking but wrong dynamics, silently.
A real alternative already exists, and is already proven in this codebase
robot_descriptions's Panda (example-robot-data's panda_description) has real inertial data -- 13 <inertial> blocks, masses 0.629769 to 4.970684 kg for the arm links (matching DH/Panda.py's values almost exactly, suggesting a common manufacturer-data lineage) -- plus full collision geometry (17 shapes: meshes for the 8 arm links, box primitives for the 2 fingers) and the complete hand/gripper.
Frankie() (URDF/Frankie.py) already loads exactly this (super().__init__("panda", manufacturer="Franka Emika", gripper_link_index=9)) in production today. Verified directly: real per-link mass, 1 collision shape per link, sane nonzero rne() output, correct gripper resolution. This is a working, shipping precedent, not a hypothetical.
The tradeoff that stopped a straight swap
The vendored qut_frankie_description Panda's collision geometry isn't generic -- it's a hand-built capsule approximation (cylinder + sphere caps per link segment), 3-6 shapes per link, vs. robot_descriptions's 1 mesh (or box) per link.
Measured directly (same obstacle, same pose, both geometries):
- Single-shape
closest_pointquery: capsule primitive (sphere/cylinder) ~0.003ms once warmed up vs. mesh ~0.19ms -- ~60x per shape pair (analytic distance formula vs. mesh GJK/EPA). link_collision_damper()(the functionexamples/neo.py-style reactive avoidance calls) end to end: 1.3ms vs 15.4ms, ~12x slower withrobot_descriptions's geometry, despite it having fewer total shapes per link (1 vs 3-6) -- the per-shape mesh cost dominates.
The vendored xacro's collision macro does have a safety_distance parameter (looked like it might matter too), but it's shipped instantiated at 0.00 in the actual file -- a dormant, unused capability, not a real factor. The actual avoidance margin comes from link_collision_damper's own ds/di runtime parameters regardless of which geometry is used.
Recommended path, not yet implemented
Hybrid: load robot_descriptions's "panda" for kinematics/mass/inertia (as Frankie() already does), then graft the vendored xacro's capsule collision shapes onto the same links by name afterward. Gets real inertial data with no collision-performance regression for reactive-avoidance examples. More code than a straight swap, but keeps both correctness properties.
Also noted in passing: dual_panda_example.urdf.xacro in the vendored package is unreferenced anywhere in src/ -- dead content, worth a separate look whenever this is picked up.
Not scoped/prioritized for this session -- filed so the investigation (and the concrete numbers above) aren't lost.
- 主要语言
- C++
- 星标
- 3.5k
- 派生
- 629
- 平均合并
- 2 天 7 小时
- 30 天内合并 PR
- 29
环境准备
- 没有 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 ·
维护者通常 2 天内回复
-
Robot `repr`未关闭
难度 3/5 1-2 天 新手友好度 68/100
petercorke/robotics-toolbox-python#711 ·
维护者通常 2 天内回复
-
tech-debt
难度 5/5 一周以上 新手友好度 35/100
petercorke/robotics-toolbox-python#705 ·
维护者通常 2 天内回复
-
Verify DH.Panda inertial parameters可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭tech-debt
难度 4/5 3-5 天 新手友好度 48/100
petercorke/robotics-toolbox-python#688 ·
维护者通常 2 天内回复
-
Misc: examples folder rationalization, benchmarking, more trajectory generators, gripper composition未关闭enhancement help wanted
难度 5/5 一周以上 新手友好度 25/100
petercorke/robotics-toolbox-python#677 ·
维护者通常 2 天内回复
查看 petercorke/robotics-toolbox-python 的全部 Issue
相似的 Issue
-
needs-triage
难度 2/5 1-3 小时 新手友好度 70/100
flashinfer-ai/flashinfer#6212 ·
维护者通常 1 天内回复
-
bug graphics
难度 2/5 1-3 小时 新手友好度 76/100
FlaxEngine/FlaxEngine#4295 · 2 条评论 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
Algorithmiq/monoprop#390 ·
维护者通常 1 天内回复
-
docs
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
leethomason/tinyxml2#1097 ·