From 776c3d98b1c7352f6543e988a1050f090b8140f3 Mon Sep 17 00:00:00 2001 From: Idril Geer <igeer@iri.upc.edu> Date: Mon, 21 Dec 2020 17:46:22 +0100 Subject: [PATCH] added skew() function --- include/core/math/SE2.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/core/math/SE2.h b/include/core/math/SE2.h index a051a63e3..ffd8ac872 100644 --- a/include/core/math/SE2.h +++ b/include/core/math/SE2.h @@ -36,6 +36,12 @@ inline Eigen::Matrix<T, 2, 2> exp(const T theta) namespace SE2{ +template<class T> +inline Eigen::Matrix<T, 2, 2> skew(const T& t) +{ + return (Eigen::Matrix<T, 2, 2>() << (T) 0, -t, t, (T) 0).finished(); +} + /** \brief Compute [1]_x * t = (-t.y ; t.x) */ template<class D> -- GitLab