From c00038d564720d4335c35f0a5512b9783670058d Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Mon, 13 Apr 2026 20:10:25 +1000 Subject: [PATCH] Fix breaking bug in `angvec2r`. Changes to `getvector` behaviour mean that a scalar argument becomes a 1D vector which breaks the Rodrigue's equation. Fix is to pass `vector=False` to `getvector`. --- spatialmath/base/transforms3d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spatialmath/base/transforms3d.py b/spatialmath/base/transforms3d.py index 08d3be26..04f9e1b8 100644 --- a/spatialmath/base/transforms3d.py +++ b/spatialmath/base/transforms3d.py @@ -752,7 +752,7 @@ def angvec2r(theta: float, v: ArrayLike3, unit="rad", tol: float = 20) -> SO3Arr if np.linalg.norm(v) < tol * _eps: return np.eye(3) - θ = getunit(theta, unit) + θ = getunit(theta, unit, vector=False) # Rodrigue's equation