From 3d48c7be11593b1864651205e1d34c05b8029a2b Mon Sep 17 00:00:00 2001
From: Fabian Reister <fabian.reister@kit.edu>
Date: Thu, 10 Jun 2021 08:51:45 +0200
Subject: [PATCH] armem_vision: eigen::array as grid type

---
 source/RobotAPI/libraries/armem_vision/types.h | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/source/RobotAPI/libraries/armem_vision/types.h b/source/RobotAPI/libraries/armem_vision/types.h
index 828e40fb3..dd975e9b1 100644
--- a/source/RobotAPI/libraries/armem_vision/types.h
+++ b/source/RobotAPI/libraries/armem_vision/types.h
@@ -23,8 +23,8 @@
 
 #include <vector>
 
-#include <RobotAPI/libraries/armem/core/Time.h>
 #include <RobotAPI/interface/units/LaserScannerUnit.h>
+#include <RobotAPI/libraries/armem/core/Time.h>
 
 namespace armarx::armem
 {
@@ -42,7 +42,7 @@ namespace armarx::armem
         LaserScan data;
     };
 
-
+    // template<typename _ValueT = float>
     struct OccupancyGrid
     {
         float resolution;
@@ -50,8 +50,12 @@ namespace armarx::armem
         std::string frame;
         Eigen::Affine3f pose;
 
-        using Grid = std::vector<std::vector<float>>;
+        // using ValueType = _ValueT;
+        using CellType = float;
+        using Grid     = Eigen::Array<CellType, Eigen::Dynamic, Eigen::Dynamic>;
+
         Grid grid;
     };
 
-}  // namespace armarx::armem
+
+} // namespace armarx::armem
-- 
GitLab