Fix transformation matrix docstrings on develop#5895
Conversation
Updated description for frame transformation: T_AB = "from frame B to A", NOT "from frame A to B" Signed-off-by: Junette Hsin <junetter@gmail.com>
There was a problem hiding this comment.
🤖 Isaac Lab Review Bot
Summary
This PR corrects the docstrings in combine_frame_transforms() and subtract_frame_transforms() to state that T_{AB} maps from frame B to frame A, aligning the develop branch with the fix already merged on main (#5819). The correction is mathematically accurate.
Design Assessment
The notation T_{AB} meaning "transforms points from frame B into frame A" is the standard robotics convention (the subscript reads as "A relative to B" or equivalently "from B to A"). This matches the implementation:
- In
combine_frame_transforms:t02 = t01 + quat_apply(q01, t12)correctly composes the chain frame 2 → frame 1 → frame 0, consistent withT_{02} = T_{01} × T_{12}where eachT_{XY}maps from Y to X. - In
subtract_frame_transforms:T_{12} = T_{01}^{-1} × T_{02}correctly extracts the frame 2 → frame 1 transform by inverting the frame 1 → frame 0 transform and composing with frame 2 → frame 0.
The parameter descriptions (e.g., "Position of frame 1 w.r.t. frame 0") were already correct and are now consistent with the updated matrix notation explanation.
Findings
No inaccuracies found. The corrected docstrings accurately describe the mathematical convention used in the implementation.
Test Coverage
No new tests needed — pure documentation change.
Verdict
No issues found ✅
Greptile SummaryThis PR corrects the docstring convention for
Confidence Score: 5/5Safe to merge — purely corrects two docstring lines with no changes to logic, types, or runtime behaviour. Both changed lines are docstring prose only. The new wording ("from frame B to A") is mathematically consistent with the actual implementations: No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["T_01\n(maps frame 1 → frame 0)"] --> C["T_01 × T_12\n= T_02"]
B["T_12\n(maps frame 2 → frame 1)"] --> C
C --> D["combine_frame_transforms\nreturns position & orientation\nof frame 2 w.r.t. frame 0"]
E["T_01\n(maps frame 1 → frame 0)"] --> G["T_01⁻¹ × T_02\n= T_12"]
F["T_02\n(maps frame 2 → frame 0)"] --> G
G --> H["subtract_frame_transforms\nreturns position & orientation\nof frame 2 w.r.t. frame 1"]
style A fill:#d0e8ff
style B fill:#d0e8ff
style E fill:#d0e8ff
style F fill:#d0e8ff
style D fill:#d4edda
style H fill:#d4edda
Reviews (1): Last reviewed commit: "Fix documentation for transformation mat..." | Re-trigger Greptile |
Description
Updates the transformation-matrix docstrings in
combine_frame_transforms()andsubtract_frame_transforms()ondevelopto state thatT_{AB}maps from frame B to frame A, matching #5819 onmain.No new dependencies.
Fixes # N/A - follow-up to #5819 for
develop.Type of change
Screenshots
Not applicable.
Checklist
pre-commitchecks with./isaaclab.sh --format(./isaaclab.sh -f; all hooks pass exceptcheck-git-lfs-pointers, which fails becausegit-lfsis not installed locally)source/<pkg>/changelog.d/for every touched package (source/isaaclab/changelog.d/antoiner-fix-transform-docs-develop.skip)CONTRIBUTORS.mdor my name already exists there (Antoine Richard)