From cad309160d871f56187907f6eba20a6275aee441 Mon Sep 17 00:00:00 2001 From: Hubertus Tummescheit Date: Mon, 2 Nov 2026 13:42:10 -0500 Subject: [PATCH] Fix the angular velocity returned by Frames.from_T_inv The input w is the angular velocity of frame 1 w.r.t. frame 2, resolved in frame 1 (skew(w) = T_inv*der(transpose(T_inv))). The orientation object stores the angular velocity of frame 2 w.r.t. frame 1, resolved in frame 2, which is -transpose(T_inv)*w. Returning -w is only correct when w is parallel to the rotation axis. Co-Authored-By: Claude Opus 5.5 --- Modelica/Mechanics/MultiBody/Frames/from_T_inv.mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modelica/Mechanics/MultiBody/Frames/from_T_inv.mo b/Modelica/Mechanics/MultiBody/Frames/from_T_inv.mo index c61ad9090b..6b53e359f7 100644 --- a/Modelica/Mechanics/MultiBody/Frames/from_T_inv.mo +++ b/Modelica/Mechanics/MultiBody/Frames/from_T_inv.mo @@ -9,7 +9,7 @@ function from_T_inv "Angular velocity from frame 1 with respect to frame 2, resolved in frame 1 (skew(w)=T_inv*der(transpose(T_inv)))"; output Orientation R "Orientation object to rotate frame 1 into frame 2"; algorithm - R := Orientation(T=transpose(T_inv),w= -w); + R := Orientation(T=transpose(T_inv),w= -transpose(T_inv)*w); annotation(Inline=true, Documentation(info="

Syntax