Twist as displacement vs velocity: document both, and decide Twist3 * SpatialVelocity and Twist/SpatialVelocity conversion
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 15/100
- Issue-Typ
- Dokumentation
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- python
- Bereich
- api, documentation
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Python
- Sterne
- 648
- Forks
- 108
- Ø Merge
- 9 T. 19 Std.
- Gemergte PRs (30 T.)
- 9
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rai-opensource/spatialmath-python
-
trlog2 loses the quadrant for valid SO(2) and SE(2) rotationsEvtl. vergeben @vera-rubin hat das vor 8 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
rai-opensource/spatialmath-python#252 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Very long delay (10–20 s) on first plot in a fresh environment: Matplotlib font-cache buildEvtl. vergeben @Doribelove hat das vor 1 Tag übernommen. Offendocumentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
rai-opensource/spatialmath-python#235 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
rai-opensource/spatialmath-python#32 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
rai-opensource/spatialmath-python#268 ·
Maintainer antworten meist innerhalb von 1 Tag
-
expand_dims(None) raises TypeError although None is its documented defaultEvtl. vergeben @Doribelove hat das vor 2 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 52/100
rai-opensource/spatialmath-python#261 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in rai-opensource/spatialmath-python
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
aws-samples/sample-per-model-bedrock#464 ·
Maintainer antworten meist innerhalb von 1 Tag
-
lesson-submission pending-review
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
Ikalus1988/MisakaNet#3789 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Python Volcengine provider returns failures instead of raising themEvtl. vergeben @Ricardo-M-L hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
agent-infra/sandbox#248 ·
-
[Bug] cloud JSON directory loading assumes a Key field in fsspec listingsEvtl. vergeben @Ricardo-M-L hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
hiyouga/LlamaFactory#10910 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bundled uv is never updated and trusts the compromised eMudhra certificatesEvtl. vergeben @FabienDanieau hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100