From 9577e13b4efa7014eaef1ba5fd6ab08f6a4154e1 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: Wed, 1 Mar 2023 18:37:32 +0100
Subject: [PATCH] cleanup

---
 .../tof_based_grasping/Component.cpp           | 18 +++++++-----------
 .../components/tof_based_grasping/Component.h  |  7 +------
 2 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/source/armarx/manipulation/components/tof_based_grasping/Component.cpp b/source/armarx/manipulation/components/tof_based_grasping/Component.cpp
index f292e46c..aa50d146 100644
--- a/source/armarx/manipulation/components/tof_based_grasping/Component.cpp
+++ b/source/armarx/manipulation/components/tof_based_grasping/Component.cpp
@@ -27,12 +27,6 @@
 #include <SimoxUtility/algorithm/string/string_tools.h>
 #include <VirtualRobot/MathTools.h>
 
-// Include headers you only need in function definitions in the .cpp.
-
-// #include <Eigen/Core>
-
-// #include <SimoxUtility/color/Color.h>
-
 #include "ArmarXCore/core/exceptions/local/ExpressionException.h"
 #include "ArmarXCore/core/logging/Logging.h"
 #include "ArmarXCore/core/time.h"
@@ -69,8 +63,10 @@ namespace armarx::manipulation::components::tof_based_grasping
             constexpr float maxDistanceValid = 150; // FIXME magic number
             constexpr float distanceGraspThreshold = 40; // FIXME magic number
 
-            const MaskMatrixType tofLeftMask = tofLeft->array.array() > minDistanceValid and tofLeft->array.array() < maxDistanceValid;
-            const MaskMatrixType tofRightMask = tofRight->array.array() > minDistanceValid and tofRight->array.array() < maxDistanceValid;
+            const MaskMatrixType tofLeftMask = tofLeft->array.array() > minDistanceValid and
+                                               tofLeft->array.array() < maxDistanceValid;
+            const MaskMatrixType tofRightMask = tofRight->array.array() > minDistanceValid and
+                                                tofRight->array.array() < maxDistanceValid;
 
             draw(core::Hand::Left, tofLeft.value(), tofLeftMask);
             draw(core::Hand::Right, tofRight.value(), tofRightMask);
@@ -94,9 +90,9 @@ namespace armarx::manipulation::components::tof_based_grasping
                     }
 
                     // eventually, remove thumb circumduction
-                    for(const auto& name: simox::alg::get_keys(jointValues))
+                    for (const auto& name : simox::alg::get_keys(jointValues))
                     {
-                        if(simox::alg::ends_with(name, "ThumbCircumduction"))
+                        if (simox::alg::ends_with(name, "ThumbCircumduction"))
                         {
                             jointValues.erase(name);
                         }
@@ -126,7 +122,7 @@ namespace armarx::manipulation::components::tof_based_grasping
         {
             for (std::size_t py = 0; py < static_cast<std::size_t>(tof.array.rows()); py++)
             {
-                if(not mask(px, py))
+                if (not mask(px, py))
                 {
                     continue;
                 }
diff --git a/source/armarx/manipulation/components/tof_based_grasping/Component.h b/source/armarx/manipulation/components/tof_based_grasping/Component.h
index 36e02583..6af6c4bd 100644
--- a/source/armarx/manipulation/components/tof_based_grasping/Component.h
+++ b/source/armarx/manipulation/components/tof_based_grasping/Component.h
@@ -24,15 +24,9 @@
 #pragma once
 
 
-// #include <mutex>
-
 #include "ArmarXCore/core/services/tasks/RunningTask.h"
 #include <ArmarXCore/core/Component.h>
 
-// #include <ArmarXCore/libraries/ArmarXCoreComponentPlugins/DebugObserverComponentPlugin.h>
-// #include <ArmarXGui/libraries/ArmarXGuiComponentPlugins/LightweightRemoteGuiComponentPlugin.h>
-// #include <RobotAPI/libraries/RobotAPIComponentPlugins/ArVizComponentPlugin.h>
-
 #include "RobotAPI/libraries/armem/client/plugins/ReaderWriterPlugin.h"
 #include <RobotAPI/libraries/RobotAPIComponentPlugins/ArVizComponentPlugin.h>
 #include <RobotAPI/libraries/armem/client/plugins.h>
@@ -100,6 +94,7 @@ namespace armarx::manipulation::components::tof_based_grasping
         {
             std::string robotName;
         };
+
         Properties properties;
 
 
-- 
GitLab