Twist as displacement vs velocity: document both, and decide Twist3 * SpatialVelocity and Twist/SpatialVelocity conversion
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 15/100
- Issue 類型
- 文件
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- python
- 領域
- api, documentation
研究方向
Start with the Twist2/Twist3 class docstrings and the module note in spatialvector.py, which covers SpatialVelocity and the translational-first layout. Read SpatialVector.__rmul__ to see how Twist3 * SpatialVector currently computes Ad(exp(S)) · v. The first step is a maintainer decision on the two open questions, since the docs change depends on it. Done means the docstrings state both readings, mark which properties are scale-invariant, and link to SpatialVelocity.
由索引模型根據 Issue 內容生成。
描述
Background
Twist2 and Twist3 hold an element of se(2) / se(3) as a vector [v, ω]. In robotics a "twist" is used in two ways that share the same vector, the same layout and the same algebra, but have different physical meaning:
| Displacement (screw) | Velocity | |
|---|---|---|
What S is |
the log of a pose; often a unit screw axis times a magnitude | an instantaneous rate, with units m/s and rad/s |
| Pose from it | exp(S), or exp(S * theta) for a unit S |
exp(S * dt) over a time dt |
| Used in | RVC (§2.3.2.3), Modern Robotics (Lynch & Park), product-of-exponentials kinematics | ROS geometry_msgs/Twist, differential kinematics |
The class is currently written for the first reading (unit(), pitch, line(), exp(theta)), but nothing in the docs says so, and users arriving from ROS reasonably expect the second.
SpatialVelocity already exists in spatialvector.py as part of the Featherstone family (velocity, acceleration, force, momentum). It uses the same translational-first layout as Twist3 (see the module note), and it is the right home for the velocity reading, because force and momentum are dual to motion and transform with the coadjoint (see #207).
What is not proposed
- Renaming
Twist2/Twist3, or adding a second twist-like class. The algebra is identical, so that would duplicate it, andTwistis the term used in RVC and RTB.
Why it matters in practice
Most operations are the same under both readings. The ones that describe the screw axis are invariant to scaling the twist, so they hold for both: pitch, line() (Plücker coordinates scale but the line does not) and pole. pole was the one place that silently assumed |ω| = 1, which #249 fixes. The ones that depend on magnitude (theta, exp(S * k)) are an angle in one reading and a rate in the other.
The interpretation also leaks into behaviour in one place, which is the first question below.
Proposed
A docs-only change so the class docstrings describe both usages, say which properties are scale-invariant, and point to SpatialVelocity.
Open questions
1. What should Twist3 * SpatialVelocity (and the other SpatialVector types) mean?
Since #210, it computes Ad(exp(S)) · v via SpatialVector.__rmul__. That is the displacement reading: the twist acts as the pose exp(S), the same as SE3 * v. Under the velocity reading the natural action of one velocity on another is the Lie bracket ad(S) · v, which SpatialVelocity @ already provides, and exp(S) would carry an implicit dt = 1.
Options:
- (a) Keep it, and document
*as the finite-displacement action. - (b) Keep it, and also make the bracket route easy to find from
Twist3. - (c) Make
*require anSE3and have the user writeS.SE3() * v, so the choice is explicit.
2. Should there be explicit conversion between Twist3 and SpatialVelocity (and Twist2 where it applies)?
The layouts match, so it is trivial, and it would make the relationship discoverable. Things to decide: constructors (SpatialVelocity(twist) / Twist3(velocity)) versus named methods, and whether a conversion should say anything about dt or the frame, since SpatialVelocity here carries no frame tag.
Related
- #207, #210: spatial vector transforms and
Twist3 * SpatialVector - #249:
polemade invariant to scaling the twist - Featherstone, Rigid Body Dynamics Algorithms; Murray, Li & Sastry, A Mathematical Introduction to Robotic Manipulation
- 主要語言
- Python
- 星號
- 648
- 分支
- 108
- 平均合併
- 9 天 19 小時
- 30 天內合併 PR
- 9
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
rai-opensource/spatialmath-python 的其他 Issue
-
trlog2 loses the quadrant for valid SO(2) and SE(2) rotations可能已有人在做 @vera-rubin 於 6 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
rai-opensource/spatialmath-python#252 ·
維護者通常 1 天內回覆
-
documentation
難度 2/5 1-3 小時 新手友好度 74/100
rai-opensource/spatialmath-python#235 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 65/100
rai-opensource/spatialmath-python#32 · 4 則留言 ·
維護者通常 1 天內回覆
-
enhancement
難度 4/5 3-5 天 新手友好度 45/100
rai-opensource/spatialmath-python#268 ·
維護者通常 1 天內回覆
-
expand_dims(None) raises TypeError although None is its documented default可能已有人在做 @Doribelove 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 52/100
rai-opensource/spatialmath-python#261 ·
維護者通常 1 天內回覆
查看 rai-opensource/spatialmath-python 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 77/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
pgvector/pgvector-python#169 ·
-
ChaosEngine: backup-remote doctor row passes while consumer mode hides bot memory from git可能已有人在做 @MohabMohie 今天認領。 未關閉agentic
難度 2/5 1-3 小時 新手友好度 76/100
ShaftHQ/SHAFT_ENGINE#7263 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 87/100
huggingface/smolagents#3045 ·
維護者通常 1 天內回覆