diff --git a/gtsam/geometry/EssentialMatrix.h b/gtsam/geometry/EssentialMatrix.h index 4257b867b..d616ac0fa 100644 --- a/gtsam/geometry/EssentialMatrix.h +++ b/gtsam/geometry/EssentialMatrix.h @@ -48,6 +48,12 @@ public: aRb_(aRb), aTb_(aTb), E_(aTb_.skew() * aRb_.matrix()) { } + /// Random, using Rot3::Random and Sphere2::Random + template + static EssentialMatrix Random(Engine & rng) { + return EssentialMatrix(Rot3::Random(rng), Sphere2::Random(rng)); + } + /// @} /// @name Testable