From f88d7dc0815c458a52520d26453515ae87ced3c1 Mon Sep 17 00:00:00 2001
From: Fabian Paus <fabian.paus@kit.edu>
Date: Thu, 21 May 2020 15:31:24 +0200
Subject: [PATCH] Use std instead of boost

---
 .../RobotAPI/components/ArViz/ArVizStorage.h  |  2 --
 .../components/ArViz/Coin/Visualizer.cpp      |  7 +++---
 .../RobotState/RobotStateComponent.cpp        |  2 --
 .../RobotState/SharedRobotServants.cpp        | 22 +++++++++----------
 .../RobotState/SharedRobotServants.h          |  6 ++---
 .../RobotAPI/components/units/HeadIKUnit.cpp  |  6 ++---
 .../NJointControllers/NJointController.cpp    |  6 ++---
 .../NJointControllers/NJointController.h      |  9 ++++----
 .../NJointControllers/NJointController.ipp    | 10 ++++-----
 .../RobotUnitModuleControllerManagement.cpp   |  4 ++--
 .../units/RobotUnit/Units/KinematicSubUnit.h  |  2 --
 .../units/RobotUnit/Units/PlatformSubUnit.cpp |  2 ++
 .../units/RobotUnit/Units/PlatformSubUnit.h   |  2 --
 .../components/units/TCPControlUnit.cpp       |  3 +--
 .../components/units/TCPControlUnit.h         |  4 +++-
 .../HokuyoLaserUnit/HokuyoLaserUnit.cpp       |  8 ++-----
 .../OrientedTactileSensorUnit.h               |  1 -
 .../WeissHapticSensor/SerialInterface.cpp     |  1 -
 .../WeissHapticSensor/WeissHapticSensor.cpp   |  4 ++--
 .../WeissHapticSensor/WeissHapticSensor.h     |  5 +++--
 .../KinematicUnitGuiPlugin.cpp                |  9 +-------
 .../QWidgets/RobotUnitWidgetBase.cpp          |  2 ++
 .../RobotViewerGuiPlugin.cpp                  |  9 +-------
 .../ArmarXEtherCAT/AbstractFunctionalDevice.h |  1 -
 .../RobotStatechartHelpers/RobotNameHelper.h  |  2 --
 source/RobotAPI/libraries/core/FramedPose.h   |  2 --
 .../RobotAPI/libraries/diffik/NaturalDiffIK.h |  2 --
 .../RobotAPI/libraries/diffik/SimpleDiffIK.h  |  6 ++---
 .../CartesianNaturalPositionControllerProxy.h |  3 ++-
 29 files changed, 55 insertions(+), 87 deletions(-)

diff --git a/source/RobotAPI/components/ArViz/ArVizStorage.h b/source/RobotAPI/components/ArViz/ArVizStorage.h
index 0afaed33a..08b7d20ff 100644
--- a/source/RobotAPI/components/ArViz/ArVizStorage.h
+++ b/source/RobotAPI/components/ArViz/ArVizStorage.h
@@ -28,8 +28,6 @@
 #include <ArmarXCore/core/Component.h>
 #include <ArmarXCore/core/services/tasks/RunningTask.h>
 
-#include <boost/circular_buffer.hpp>
-
 #include <mutex>
 #include <atomic>
 #include <condition_variable>
diff --git a/source/RobotAPI/components/ArViz/Coin/Visualizer.cpp b/source/RobotAPI/components/ArViz/Coin/Visualizer.cpp
index d9beef41b..f11c7aa9d 100644
--- a/source/RobotAPI/components/ArViz/Coin/Visualizer.cpp
+++ b/source/RobotAPI/components/ArViz/Coin/Visualizer.cpp
@@ -1,13 +1,12 @@
 #include "Visualizer.h"
 
 #include <ArmarXCore/core/logging/Logging.h>
+#include <ArmarXCore/util/CPPUtility/GetTypeString.h>
 
 #include <Inventor/sensors/SoTimerSensor.h>
 #include <Inventor/nodes/SoUnits.h>
 #include <thread>
 
-#include <boost/core/demangle.hpp>
-
 #include "VisualizationRobot.h"
 
 namespace armarx::viz
@@ -168,7 +167,7 @@ namespace armarx::viz
             {
                 ARMARX_WARNING << deactivateSpam(1)
                                << "No visualizer for element type found: "
-                               << boost::core::demangle(elementType.name());
+                               << armarx::GetTypeString(elementType);
                 continue;
             }
             coin::ElementVisualizer* visualizer = elementVisualizers[visuIndex].get();
@@ -216,7 +215,7 @@ namespace armarx::viz
             }
             else
             {
-                std::string typeName = boost::core::demangle(elementType.name());
+                std::string typeName = armarx::GetTypeString(elementType);
                 ARMARX_WARNING << deactivateSpam(typeName, 1)
                                << "CoinElementVisualizer returned null for type: " << typeName << "\n"
                                << "You need to register a visualizer for each type in ArViz/Coin/Visualizer.cpp";
diff --git a/source/RobotAPI/components/RobotState/RobotStateComponent.cpp b/source/RobotAPI/components/RobotState/RobotStateComponent.cpp
index 53fb866aa..473ec9a16 100644
--- a/source/RobotAPI/components/RobotState/RobotStateComponent.cpp
+++ b/source/RobotAPI/components/RobotState/RobotStateComponent.cpp
@@ -23,8 +23,6 @@
  */
 
 #include "RobotStateComponent.h"
-#include <boost/foreach.hpp>
-#include <boost/format.hpp>
 
 #include <Ice/ObjectAdapter.h>
 
diff --git a/source/RobotAPI/components/RobotState/SharedRobotServants.cpp b/source/RobotAPI/components/RobotState/SharedRobotServants.cpp
index da99bba0d..cfc854b4c 100644
--- a/source/RobotAPI/components/RobotState/SharedRobotServants.cpp
+++ b/source/RobotAPI/components/RobotState/SharedRobotServants.cpp
@@ -25,8 +25,6 @@
 
 #include <ArmarXCore/core/logging/Logging.h>
 
-#include <boost/foreach.hpp>
-
 #include <Eigen/Geometry>
 
 #include <VirtualRobot/Nodes/RobotNode.h>
@@ -68,7 +66,7 @@ namespace armarx
 
     void SharedObjectBase::ref(const Current& current)
     {
-        boost::lock_guard<boost::mutex> lock(this->_counterMutex);
+        std::unique_lock lock(this->_counterMutex);
 
         _referenceCount++;
 
@@ -79,7 +77,7 @@ namespace armarx
 
     void SharedObjectBase::unref(const Current& current)
     {
-        boost::lock_guard<boost::mutex> lock(this->_counterMutex);
+        std::unique_lock lock(this->_counterMutex);
 
 #ifdef VERBOSE
         ARMARX_LOG_S << "unref: " <<   _referenceCount << " " << this << flush;
@@ -237,7 +235,7 @@ namespace armarx
         ReadLockPtr lock = _node->getRobot()->getReadLock();
         std::vector<SceneObjectPtr> children = _node->getChildren();
         NameList names;
-        BOOST_FOREACH(SceneObjectPtr node, children)
+        for (SceneObjectPtr const& node : children)
         {
             names.push_back(node->getName());
         }
@@ -249,7 +247,7 @@ namespace armarx
         ReadLockPtr lock = _node->getRobot()->getReadLock();
         std::vector<RobotNodePtr> parents = _node->getAllParents(_node->getRobot()->getRobotNodeSet(name));
         NameList names;
-        BOOST_FOREACH(RobotNodePtr node, parents)
+        for (RobotNodePtr const& node : parents)
         {
             names.push_back(node->getName());
         }
@@ -320,7 +318,7 @@ namespace armarx
 #ifdef VERBOSE
         ARMARX_WARNING_S << "destruct " << this << flush;
 #endif
-        boost::recursive_mutex::scoped_lock cloneLock(m);
+        std::unique_lock cloneLock(m);
 
         for (auto value : this->_cachedNodes)
         {
@@ -341,7 +339,7 @@ namespace armarx
     {
         //    ARMARX_LOG_S << "Looking for node: " << name << flush;
         assert(_robot);
-        boost::recursive_mutex::scoped_lock cloneLock(m);
+        std::unique_lock cloneLock(m);
         SharedRobotNodeInterfacePrx prx;
 
         if (this->_cachedNodes.find(name) == this->_cachedNodes.end())
@@ -369,7 +367,7 @@ namespace armarx
     SharedRobotNodeInterfacePrx SharedRobotServant::getRootNode(const Current& current)
     {
         assert(_robot);
-        boost::recursive_mutex::scoped_lock cloneLock(m);
+        std::unique_lock cloneLock(m);
         std::string name = _robot->getRootNode()/*,current*/->getName();
         return this->getRobotNode(name, current);
     }
@@ -384,7 +382,7 @@ namespace armarx
     {
         std::vector<RobotNodePtr> robotNodes = _robot->getRobotNodes();
         NameList names;
-        BOOST_FOREACH(RobotNodePtr node, robotNodes)
+        for (RobotNodePtr const& node : robotNodes)
         {
             names.push_back(node->getName());
         }
@@ -402,7 +400,7 @@ namespace armarx
 
         std::vector<RobotNodePtr> robotNodes = robotNodeSet->getAllRobotNodes();
         NameList names;
-        BOOST_FOREACH(RobotNodePtr node, robotNodes)
+        for (RobotNodePtr const& node : robotNodes)
         {
             names.push_back(node->getName());
         }
@@ -421,7 +419,7 @@ namespace armarx
     {
         std::vector<RobotNodeSetPtr> robotNodeSets = _robot->getRobotNodeSets();
         NameList names;
-        BOOST_FOREACH(RobotNodeSetPtr set, robotNodeSets)
+        for (RobotNodeSetPtr const& set : robotNodeSets)
         {
             names.push_back(set->getName());
         }
diff --git a/source/RobotAPI/components/RobotState/SharedRobotServants.h b/source/RobotAPI/components/RobotState/SharedRobotServants.h
index 76addb6ea..5dff6c389 100644
--- a/source/RobotAPI/components/RobotState/SharedRobotServants.h
+++ b/source/RobotAPI/components/RobotState/SharedRobotServants.h
@@ -30,7 +30,7 @@
 
 #include <VirtualRobot/VirtualRobot.h>
 
-#include <boost/thread.hpp>
+#include <mutex>
 
 namespace armarx
 {
@@ -51,7 +51,7 @@ namespace armarx
         SharedObjectBase();
     private:
         unsigned int _referenceCount;
-        boost::mutex _counterMutex;
+        std::mutex _counterMutex;
     };
 
     /**
@@ -141,7 +141,7 @@ namespace armarx
         RobotStateComponentInterfacePrx getRobotStateComponent(const Ice::Current&) const override;
     protected:
         VirtualRobot::RobotPtr _robot;
-        boost::recursive_mutex m;
+        std::recursive_mutex m;
         std::map<std::string, SharedRobotNodeInterfacePrx> _cachedNodes;
         IceUtil::Time updateTimestamp;
         RobotStateComponentInterfacePrx robotStateComponent;
diff --git a/source/RobotAPI/components/units/HeadIKUnit.cpp b/source/RobotAPI/components/units/HeadIKUnit.cpp
index b4d6e62f6..8e3037bad 100644
--- a/source/RobotAPI/components/units/HeadIKUnit.cpp
+++ b/source/RobotAPI/components/units/HeadIKUnit.cpp
@@ -33,8 +33,11 @@
 
 #include <boost/algorithm/string/trim.hpp>
 
+#include <boost/shared_ptr.hpp>
 #include <memory>
 
+using boost::dynamic_pointer_cast;
+using std::dynamic_pointer_cast;
 
 namespace armarx
 {
@@ -308,9 +311,6 @@ namespace armarx
                 auto tcpNode = kinematicChain->getTCP();
                 VirtualRobot::RobotNodePrismaticPtr virtualPrismaticJoint;
 
-
-                using boost::dynamic_pointer_cast;
-                using std::dynamic_pointer_cast;
                 virtualPrismaticJoint = dynamic_pointer_cast<VirtualRobot::RobotNodePrismatic>(tcpNode);
                 if (!virtualPrismaticJoint)
                 {
diff --git a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.cpp b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.cpp
index fbd850fd6..e42b68f1d 100644
--- a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.cpp
+++ b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.cpp
@@ -80,7 +80,7 @@ namespace armarx
         return d;
     }
 
-    boost::optional<std::vector<char> > NJointControllerBase::isNotInConflictWith(const std::vector<char>& used) const
+    std::optional<std::vector<char> > NJointControllerBase::isNotInConflictWith(const std::vector<char>& used) const
     {
         ARMARX_CHECK_EXPRESSION(used.size() == controlDeviceUsedBitmap.size());
         auto result = used;
@@ -90,13 +90,13 @@ namespace armarx
             {
                 if (used.at(i))
                 {
-                    return boost::optional<std::vector<char>>();
+                    return std::nullopt;
                 }
                 result.at(i) = true;
             }
 
         }
-        return {true, std::move(result)};
+        return std::move(result);
     }
 
     NJointControllerStatus NJointControllerBase::getControllerStatus(const Ice::Current&) const
diff --git a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.h b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.h
index 26c8a6aed..e20d9525d 100644
--- a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.h
+++ b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.h
@@ -28,8 +28,6 @@
 #include <functional>
 #include <unordered_set>
 
-#include <boost/optional.hpp>
-
 #include <ArmarXCore/core/Component.h>
 #include <ArmarXCore/core/util/Registrar.h>
 #include <ArmarXCore/core/util/TripleBuffer.h>
@@ -53,6 +51,7 @@
 #include "../util/ControlThreadOutputBuffer.h"
 
 #include <VirtualRobot/VirtualRobot.h>
+#include <optional>
 
 namespace armarx::RobotUnitModule
 {
@@ -870,11 +869,11 @@ namespace armarx
         const std::map<std::string, const JointController*>& getControlDevicesUsedJointController();
 
         //check for conflict
-        boost::optional<std::vector<char>> isNotInConflictWith(const NJointControllerBasePtr& other) const;
-        boost::optional<std::vector<char>> isNotInConflictWith(const std::vector<char>& used) const;
+        std::optional<std::vector<char>> isNotInConflictWith(const NJointControllerBasePtr& other) const;
+        std::optional<std::vector<char>> isNotInConflictWith(const std::vector<char>& used) const;
 
         template<class ItT>
-        static boost::optional<std::vector<char>> AreNotInConflict(ItT first, ItT last);
+        static std::optional<std::vector<char>> AreNotInConflict(ItT first, ItT last);
         // //////////////////////////////////////////////////////////////////////////////////////// //
         // ////////////////////////////////////// publishing ////////////////////////////////////// //
         // //////////////////////////////////////////////////////////////////////////////////////// //
diff --git a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.ipp b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.ipp
index bcefd5a83..0b89eaf5f 100644
--- a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.ipp
+++ b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.ipp
@@ -149,7 +149,7 @@ namespace armarx
         return controlDeviceUsedJointController;
     }
 
-    inline boost::optional<std::vector<char> > NJointControllerBase::isNotInConflictWith(const NJointControllerBasePtr& other) const
+    inline std::optional<std::vector<char> > NJointControllerBase::isNotInConflictWith(const NJointControllerBasePtr& other) const
     {
         return isNotInConflictWith(other->getControlDeviceUsedBitmap());
     }
@@ -273,11 +273,11 @@ namespace armarx
 namespace armarx
 {
     template<class ItT>
-    inline boost::optional<std::vector<char>> NJointControllerBase::AreNotInConflict(ItT first, ItT last)
+    inline std::optional<std::vector<char>> NJointControllerBase::AreNotInConflict(ItT first, ItT last)
     {
         if (first == last)
         {
-            return {true, std::vector<char>{}};
+            return std::vector<char>{};
         }
         std::size_t n = (*first)->getControlDeviceUsedBitmap().size();
         std::vector<char> inuse(n, false);
@@ -288,10 +288,10 @@ namespace armarx
             {
                 return r;
             }
-            inuse = std::move(r.get());
+            inuse = std::move(*r);
             ++first;
         }
-        return {true, std::move(inuse)};
+        return std::move(inuse);
     }
 }
 namespace armarx::detail
diff --git a/source/RobotAPI/components/units/RobotUnit/RobotUnitModules/RobotUnitModuleControllerManagement.cpp b/source/RobotAPI/components/units/RobotUnit/RobotUnitModules/RobotUnitModuleControllerManagement.cpp
index 1cb5f3756..8f5960857 100644
--- a/source/RobotAPI/components/units/RobotUnit/RobotUnitModules/RobotUnitModuleControllerManagement.cpp
+++ b/source/RobotAPI/components/units/RobotUnit/RobotUnitModules/RobotUnitModuleControllerManagement.cpp
@@ -364,7 +364,7 @@ namespace armarx::RobotUnitModule
                 ARMARX_ERROR << ss.str();
                 throw InvalidArgumentException {ss.str()};
             }
-            inuse = std::move(r.get());
+            inuse = std::move(*r);
         }
         ARMARX_DEBUG << "all requested controllers are conflict free" << std::flush;
         auto printInUse = ARMARX_STREAM_PRINTER
@@ -393,7 +393,7 @@ namespace armarx::RobotUnitModule
                     ARMARX_DEBUG << "keeping  already requested NJointControllerBase '"
                                  << nJointCtrl->getInstanceName() << "' in   list of requested controllers";
                     ctrlsToAct.insert(nJointCtrl);
-                    inuse = std::move(r.get());
+                    inuse = std::move(*r);
                 }
                 else
                 {
diff --git a/source/RobotAPI/components/units/RobotUnit/Units/KinematicSubUnit.h b/source/RobotAPI/components/units/RobotUnit/Units/KinematicSubUnit.h
index 65e8263cc..7913d2dd9 100644
--- a/source/RobotAPI/components/units/RobotUnit/Units/KinematicSubUnit.h
+++ b/source/RobotAPI/components/units/RobotUnit/Units/KinematicSubUnit.h
@@ -24,8 +24,6 @@
 
 #include <mutex>
 
-#include <boost/algorithm/string.hpp>
-
 #include <ArmarXCore/core/exceptions/local/ExpressionException.h>
 
 #include <RobotAPI/components/units/KinematicUnit.h>
diff --git a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp
index f67bb14d7..99ec57ddd 100755
--- a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp
+++ b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp
@@ -21,6 +21,8 @@
  */
 #include "PlatformSubUnit.h"
 
+#include <boost/algorithm/clamp.hpp>
+
 void armarx::PlatformSubUnit::update(const armarx::SensorAndControl& sc, const JointAndNJointControllers&)
 {
     if (!getProxy())
diff --git a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h
index 7420f33e0..7fb01dd2a 100755
--- a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h
+++ b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h
@@ -24,8 +24,6 @@
 
 #include <mutex>
 
-#include <boost/algorithm/clamp.hpp>
-
 #include <Eigen/Core>
 
 #include <VirtualRobot/MathTools.h>
diff --git a/source/RobotAPI/components/units/TCPControlUnit.cpp b/source/RobotAPI/components/units/TCPControlUnit.cpp
index 2e3f100c8..8cb2c9095 100644
--- a/source/RobotAPI/components/units/TCPControlUnit.cpp
+++ b/source/RobotAPI/components/units/TCPControlUnit.cpp
@@ -23,8 +23,6 @@
 #include "TCPControlUnit.h"
 #include <RobotAPI/libraries/core/LinkedPose.h>
 
-#include <boost/unordered_map.hpp>
-
 #include <ArmarXCore/core/exceptions/local/ExpressionException.h>
 
 #include <ArmarXCore/core/system/ArmarXDataPath.h>
@@ -37,6 +35,7 @@
 #include <boost/algorithm/string/split.hpp>
 #include <boost/algorithm/string/classification.hpp>
 
+#include <boost/shared_ptr.hpp>
 #include <memory>
 
 using namespace VirtualRobot;
diff --git a/source/RobotAPI/components/units/TCPControlUnit.h b/source/RobotAPI/components/units/TCPControlUnit.h
index e24e2f8dc..8b373d101 100644
--- a/source/RobotAPI/components/units/TCPControlUnit.h
+++ b/source/RobotAPI/components/units/TCPControlUnit.h
@@ -31,6 +31,8 @@
 #include <RobotAPI/libraries/core/remoterobot/RemoteRobot.h>
 #include <ArmarXCore/interface/observers/ObserverInterface.h>
 
+#include <memory>
+
 namespace armarx
 {
     /**
@@ -275,7 +277,7 @@ namespace armarx
         std::map<VirtualRobot:: SceneObjectPtr, Eigen::VectorXf> tcpWeights;
         Eigen::VectorXf tcpWeightVec;
     };
-    using EDifferentialIKPtr = boost::shared_ptr<EDifferentialIK>;
+    using EDifferentialIKPtr = std::shared_ptr<EDifferentialIK>;
 
 }
 
diff --git a/source/RobotAPI/drivers/HokuyoLaserUnit/HokuyoLaserUnit.cpp b/source/RobotAPI/drivers/HokuyoLaserUnit/HokuyoLaserUnit.cpp
index 9f1508cce..af108e0e0 100644
--- a/source/RobotAPI/drivers/HokuyoLaserUnit/HokuyoLaserUnit.cpp
+++ b/source/RobotAPI/drivers/HokuyoLaserUnit/HokuyoLaserUnit.cpp
@@ -24,9 +24,7 @@
 
 #include <ArmarXCore/observers/variant/TimestampVariant.h>
 
-#include <boost/algorithm/string/split.hpp>
 #include <boost/algorithm/string/replace.hpp>
-#include <boost/algorithm/string/classification.hpp>
 
 #include <HokuyoLaserScannerDriver/urg_utils.h>
 
@@ -45,14 +43,12 @@ void HokuyoLaserUnit::onInitComponent()
     angleOffset = getProperty<float>("AngleOffset").getValue();
 
     std::string deviceStrings = getProperty<std::string>("Devices").getValue();
-    std::vector<std::string> splitDeviceStrings;
-    boost::split(splitDeviceStrings, deviceStrings, boost::is_any_of(";"));
+    std::vector<std::string> splitDeviceStrings = Split(deviceStrings, ";");
     devices.clear();
     devices.reserve(splitDeviceStrings.size());
     for (std::string const& deviceString : splitDeviceStrings)
     {
-        std::vector<std::string> deviceInfo;
-        boost::split(deviceInfo, deviceString, boost::is_any_of(","));
+        std::vector<std::string> deviceInfo = Split(deviceString, ",");
         if (deviceInfo.size() != 3)
         {
             ARMARX_WARNING << "Unexpected format for laser scanner device: " << deviceString
diff --git a/source/RobotAPI/drivers/OrientedTactileSensor/OrientedTactileSensorUnit.h b/source/RobotAPI/drivers/OrientedTactileSensor/OrientedTactileSensorUnit.h
index d8a1c3496..7e584629a 100644
--- a/source/RobotAPI/drivers/OrientedTactileSensor/OrientedTactileSensorUnit.h
+++ b/source/RobotAPI/drivers/OrientedTactileSensor/OrientedTactileSensorUnit.h
@@ -9,7 +9,6 @@
 #include <iostream>
 #include <fstream>
 #include <stdio.h>
-#include <boost/date_time/posix_time/posix_time.hpp>
 #include <Eigen/Dense>
 #include <RobotAPI/libraries/SimpleJsonLogger/SimpleJsonLogger.h>
 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
diff --git a/source/RobotAPI/drivers/WeissHapticSensor/SerialInterface.cpp b/source/RobotAPI/drivers/WeissHapticSensor/SerialInterface.cpp
index 8559064a7..b0a2f0b37 100644
--- a/source/RobotAPI/drivers/WeissHapticSensor/SerialInterface.cpp
+++ b/source/RobotAPI/drivers/WeissHapticSensor/SerialInterface.cpp
@@ -35,7 +35,6 @@
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <iostream>
-#include <boost/lexical_cast.hpp>
 #include <boost/format.hpp>
 
 static inline tcflag_t __bitrate_to_flag(unsigned int bitrate)
diff --git a/source/RobotAPI/drivers/WeissHapticSensor/WeissHapticSensor.cpp b/source/RobotAPI/drivers/WeissHapticSensor/WeissHapticSensor.cpp
index 3f13ff1bc..899c86434 100644
--- a/source/RobotAPI/drivers/WeissHapticSensor/WeissHapticSensor.cpp
+++ b/source/RobotAPI/drivers/WeissHapticSensor/WeissHapticSensor.cpp
@@ -123,7 +123,7 @@ std::string WeissHapticSensor::getDeviceName()
 
 void WeissHapticSensor::scheduleSetDeviceTag(std::string tag)
 {
-    boost::mutex::scoped_lock lock(mutex);
+    std::unique_lock lock(mutex);
     setDeviceTagValue = tag;
     setDeviceTagScheduled = true;
 }
@@ -206,7 +206,7 @@ void WeissHapticSensor::frameAcquisitionTaskLoop()
 
         if (setDeviceTagScheduled)
         {
-            boost::mutex::scoped_lock lock(mutex);
+            std::unique_lock lock(mutex);
             setDeviceTagScheduled = false;
 
             ARMARX_INFO << "[" << device << "] Stopping periodic frame aquisition to set new device tag";
diff --git a/source/RobotAPI/drivers/WeissHapticSensor/WeissHapticSensor.h b/source/RobotAPI/drivers/WeissHapticSensor/WeissHapticSensor.h
index 9e006ae3d..25191aab1 100644
--- a/source/RobotAPI/drivers/WeissHapticSensor/WeissHapticSensor.h
+++ b/source/RobotAPI/drivers/WeissHapticSensor/WeissHapticSensor.h
@@ -34,7 +34,8 @@
 #include <ArmarXCore/observers/variant/TimestampVariant.h>
 #include <RobotAPI/libraries/core/math/SlidingWindowVectorMedian.h>
 #include <ArmarXCore/util/variants/eigen3/MatrixVariant.h>
-#include <boost/thread/mutex.hpp>
+
+#include <mutex>
 
 namespace armarx
 {
@@ -73,7 +74,7 @@ namespace armarx
         bool setDeviceTagScheduled;
         std::string setDeviceTagValue;
 
-        boost::mutex mutex;
+        std::mutex mutex;
         int minimumReportIntervalMs;
     };
 }
diff --git a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp
index 376a64954..17ce02826 100644
--- a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp
+++ b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp
@@ -55,9 +55,6 @@
 #include <Inventor/Qt/SoQt.h>
 #include <ArmarXCore/observers/filters/MedianFilter.h>
 
-#include <boost/algorithm/string/split.hpp>
-#include <boost/algorithm/string/classification.hpp>
-
 // System
 #include <stdio.h>
 #include <string>
@@ -185,13 +182,9 @@ void KinematicUnitWidgetController::onConnectComponent()
             }
 
             CMakePackageFinder project(projectName);
-            Ice::StringSeq projectIncludePaths;
             auto pathsString = project.getDataDir();
             ARMARX_VERBOSE << "Data paths of ArmarX package " << projectName << ": " << pathsString;
-            boost::split(projectIncludePaths,
-                         pathsString,
-                         boost::is_any_of(";,"),
-                         boost::token_compress_on);
+            Ice::StringSeq projectIncludePaths = Split(pathsString, ";,", true, true);
             ARMARX_VERBOSE << "Result: Data paths of ArmarX package " << projectName << ": " << projectIncludePaths;
             includePaths.insert(includePaths.end(), projectIncludePaths.begin(), projectIncludePaths.end());
         }
diff --git a/source/RobotAPI/gui-plugins/RobotUnitPlugin/QWidgets/RobotUnitWidgetBase.cpp b/source/RobotAPI/gui-plugins/RobotUnitPlugin/QWidgets/RobotUnitWidgetBase.cpp
index 3f2d74a09..9141512a8 100644
--- a/source/RobotAPI/gui-plugins/RobotUnitPlugin/QWidgets/RobotUnitWidgetBase.cpp
+++ b/source/RobotAPI/gui-plugins/RobotUnitPlugin/QWidgets/RobotUnitWidgetBase.cpp
@@ -23,6 +23,8 @@
 #include <ArmarXCore/core/exceptions/Exception.h>
 #include <ArmarXCore/core/logging/Logging.h>
 
+#include <thread>
+
 namespace armarx
 {
     RobotUnitWidgetBase::RobotUnitWidgetBase(QString name, QWidget* parent) :
diff --git a/source/RobotAPI/gui-plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp b/source/RobotAPI/gui-plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp
index aec5c6340..90bd12423 100644
--- a/source/RobotAPI/gui-plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp
+++ b/source/RobotAPI/gui-plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp
@@ -46,9 +46,6 @@
 #include <ArmarXGui/libraries/StructuralJson/JsonWriter.h>
 #include <ArmarXCore/util/json/JSONObject.h>
 
-#include <boost/algorithm/string/split.hpp>
-#include <boost/algorithm/string/classification.hpp>
-
 // System
 #include <stdio.h>
 #include <string>
@@ -184,13 +181,9 @@ void RobotViewerWidgetController::onConnectComponent()
             }
 
             CMakePackageFinder project(projectName);
-            Ice::StringSeq projectIncludePaths;
             auto pathsString = project.getDataDir();
             ARMARX_VERBOSE << "Data paths of ArmarX package " << projectName << ": " << pathsString;
-            boost::split(projectIncludePaths,
-                         pathsString,
-                         boost::is_any_of(";,"),
-                         boost::token_compress_on);
+            Ice::StringSeq projectIncludePaths = Split(pathsString, ";,", true, true);
             ARMARX_VERBOSE << "Result: Data paths of ArmarX package " << projectName << ": " << projectIncludePaths;
             includePaths.insert(includePaths.end(), projectIncludePaths.begin(), projectIncludePaths.end());
 
diff --git a/source/RobotAPI/libraries/ArmarXEtherCAT/AbstractFunctionalDevice.h b/source/RobotAPI/libraries/ArmarXEtherCAT/AbstractFunctionalDevice.h
index ab2ad3915..0bbbf7011 100644
--- a/source/RobotAPI/libraries/ArmarXEtherCAT/AbstractFunctionalDevice.h
+++ b/source/RobotAPI/libraries/ArmarXEtherCAT/AbstractFunctionalDevice.h
@@ -2,7 +2,6 @@
 
 #include <ArmarXCore/core/rapidxml/wrapper/DefaultRapidXmlReader.h>
 #include <ArmarXCore/core/rapidxml/wrapper/RapidXmlReader.h>
-#include <boost/smart_ptr/shared_ptr.hpp>
 #include <RobotAPI/components/units/RobotUnit/JointControllers/JointController.h>
 #include <RobotAPI/libraries/ArmarXEtherCAT/VirtualDeviceFactory.h>
 
diff --git a/source/RobotAPI/libraries/RobotStatechartHelpers/RobotNameHelper.h b/source/RobotAPI/libraries/RobotStatechartHelpers/RobotNameHelper.h
index bd95565df..e03a10bc8 100644
--- a/source/RobotAPI/libraries/RobotStatechartHelpers/RobotNameHelper.h
+++ b/source/RobotAPI/libraries/RobotStatechartHelpers/RobotNameHelper.h
@@ -27,8 +27,6 @@
 
 #include <ArmarXCore/statechart/xmlstates/profiles/StatechartProfiles.h>
 
-#include <boost/optional.hpp>
-
 #include <VirtualRobot/Robot.h>
 
 namespace armarx
diff --git a/source/RobotAPI/libraries/core/FramedPose.h b/source/RobotAPI/libraries/core/FramedPose.h
index 319e542d3..3e987d97d 100644
--- a/source/RobotAPI/libraries/core/FramedPose.h
+++ b/source/RobotAPI/libraries/core/FramedPose.h
@@ -39,8 +39,6 @@
 #include <Eigen/Core>
 #include <Eigen/Geometry>
 
-#include <boost/shared_ptr.hpp>
-
 #include <sstream>
 
 namespace armarx::VariantType
diff --git a/source/RobotAPI/libraries/diffik/NaturalDiffIK.h b/source/RobotAPI/libraries/diffik/NaturalDiffIK.h
index f4c9a5af1..0bdafb506 100644
--- a/source/RobotAPI/libraries/diffik/NaturalDiffIK.h
+++ b/source/RobotAPI/libraries/diffik/NaturalDiffIK.h
@@ -23,8 +23,6 @@
 
 #pragma once
 
-#include <boost/shared_ptr.hpp>
-
 #include <VirtualRobot/Nodes/RobotNode.h>
 #include <VirtualRobot/RobotNodeSet.h>
 #include <VirtualRobot/IK/DifferentialIK.h>
diff --git a/source/RobotAPI/libraries/diffik/SimpleDiffIK.h b/source/RobotAPI/libraries/diffik/SimpleDiffIK.h
index 4ae4e22fa..ffd371a6f 100644
--- a/source/RobotAPI/libraries/diffik/SimpleDiffIK.h
+++ b/source/RobotAPI/libraries/diffik/SimpleDiffIK.h
@@ -23,14 +23,14 @@
 
 #pragma once
 
-#include <boost/shared_ptr.hpp>
-
 #include <VirtualRobot/Nodes/RobotNode.h>
 #include <VirtualRobot/RobotNodeSet.h>
 
+#include <memory>
+
 namespace armarx
 {
-    typedef boost::shared_ptr<class SimpleDiffIK> SimpleDiffIKPtr;
+    typedef std::shared_ptr<class SimpleDiffIK> SimpleDiffIKPtr;
 
     class SimpleDiffIK
     {
diff --git a/source/RobotAPI/libraries/natik/CartesianNaturalPositionControllerProxy.h b/source/RobotAPI/libraries/natik/CartesianNaturalPositionControllerProxy.h
index d87c65c4b..eb75ba243 100644
--- a/source/RobotAPI/libraries/natik/CartesianNaturalPositionControllerProxy.h
+++ b/source/RobotAPI/libraries/natik/CartesianNaturalPositionControllerProxy.h
@@ -25,11 +25,12 @@
 
 #include "NaturalIK.h"
 
-#include <boost/shared_ptr.hpp>
 #include <RobotAPI/interface/units/RobotUnit/NJointCartesianNaturalPositionController.h>
 #include <RobotAPI/interface/units/RobotUnit/RobotUnitInterface.h>
 #include <RobotAPI/interface/aron.h>
 
+#include <memory>
+
 namespace armarx
 {
     typedef std::shared_ptr<class CartesianNaturalPositionControllerProxy> CartesianNaturalPositionControllerProxyPtr;
-- 
GitLab