diff --git a/source/RobotAPI/components/ArViz/ArVizStorage.cpp b/source/RobotAPI/components/ArViz/ArVizStorage.cpp index 2b27537f1a3c0cd903b360b271ad7b02b94459ef..b0b29f25911e2899083979af9b94987dd7b70bc8 100644 --- a/source/RobotAPI/components/ArViz/ArVizStorage.cpp +++ b/source/RobotAPI/components/ArViz/ArVizStorage.cpp @@ -169,7 +169,7 @@ namespace armarx - viz::data::LayerUpdates armarx::ArVizStorage::pullUpdatesSince(Ice::Long revision, const Ice::Current&) + viz::data::LayerUpdates ArVizStorage::pullUpdatesSince(Ice::Long revision, const Ice::Current&) { viz::data::LayerUpdates result; diff --git a/source/RobotAPI/components/KITProstheticHandUnit/CMakeLists.txt b/source/RobotAPI/components/KITProstheticHandUnit/CMakeLists.txt index 92bc44f64073b1a26ceb15782207265f7bbdcad0..7becda0cb17dca65fb607f7c518a2d2a12302078 100644 --- a/source/RobotAPI/components/KITProstheticHandUnit/CMakeLists.txt +++ b/source/RobotAPI/components/KITProstheticHandUnit/CMakeLists.txt @@ -4,6 +4,7 @@ find_package(Qt5 COMPONENTS Core Bluetooth QUIET) armarx_build_if(Qt5_FOUND "Qt5 Core or Bluetooth not available") set(COMPONENT_LIBS + RemoteGui RobotAPIUnits KITProstheticHandDriver ) diff --git a/source/RobotAPI/components/units/KinematicUnitObserver.cpp b/source/RobotAPI/components/units/KinematicUnitObserver.cpp index c1796936e47e97e06b6a923a4ca6832bcdf81f40..1dacd798cc3feb30b0fb04b283b0d9ebb3eb2ae4 100644 --- a/source/RobotAPI/components/units/KinematicUnitObserver.cpp +++ b/source/RobotAPI/components/units/KinematicUnitObserver.cpp @@ -297,7 +297,7 @@ namespace armarx if (aValueChanged || newChannel) { - boost::unordered_map< ::std::string, ::armarx::VariantBasePtr> map; + std::unordered_map< ::std::string, ::armarx::VariantBasePtr> map; if (timestamp < 0) { for (const auto& it : nameValueMap) diff --git a/source/RobotAPI/components/units/RobotUnit/BasicControllers.cpp b/source/RobotAPI/components/units/RobotUnit/BasicControllers.cpp index 0ec81ab3895bc1037141ee6798c01effcbee45eb..e106a9dbb943dabd9bd23a05e9d8320b6e415b82 100644 --- a/source/RobotAPI/components/units/RobotUnit/BasicControllers.cpp +++ b/source/RobotAPI/components/units/RobotUnit/BasicControllers.cpp @@ -1419,7 +1419,7 @@ namespace armarx auto min_jerk = [&](double t, double tf, double s0, double v0, double a0, double xf = 0, double t0 = 0.0) { double D = tf - t0; - BOOST_ASSERT(D != 0.0); + ARMARX_CHECK(D != 0.0); double D2 = D * D; double tau = (t - t0) / D; double b0 = s0; diff --git a/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.cpp b/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.cpp index 92005dea9a32122b5e447d60436332286e1625dd..a568893eb8448825f471ceb44f31944e3bdab56b 100644 --- a/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.cpp +++ b/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.cpp @@ -155,28 +155,25 @@ namespace armarx::RemoteGui .addChild(new RemoteGui::HSpacer) ); } -} -namespace armarx::RemoteGui::detail::_getValue -{ - void GetValueOutputParameter <CartesianWaypointControllerConfig, void>::call( - CartesianWaypointControllerConfig& cfg, - RemoteGui::ValueMap const& values, std::string const& name) + + void getValueFromMap(CartesianWaypointControllerConfig& cfg, + RemoteGui::ValueMap const& values, std::string const& name) { - cfg.maxPositionAcceleration = getValue<float>(values, name + "_maxAcc_Pos"); - cfg.maxOrientationAcceleration = getValue<float>(values, name + "_maxAcc_Ori"); - cfg.maxNullspaceAcceleration = getValue<float>(values, name + "_maxAcc_Null"); + getValueFromMap(cfg.maxPositionAcceleration, values, name + "_maxAcc_Pos"); + getValueFromMap(cfg.maxOrientationAcceleration, values, name + "_maxAcc_Ori"); + getValueFromMap(cfg.maxNullspaceAcceleration, values, name + "_maxAcc_Null"); - cfg.kpJointLimitAvoidance = getValue<float>(values, name + "_JointLimitAvoidance_KP"); - cfg.jointLimitAvoidanceScale = getValue<float>(values, name + "_JointLimitAvoidance_Scale"); + getValueFromMap(cfg.kpJointLimitAvoidance, values, name + "_JointLimitAvoidance_KP"); + getValueFromMap(cfg.jointLimitAvoidanceScale, values, name + "_JointLimitAvoidance_Scale"); - cfg.thresholdOrientationNear = getValue<float>(values, name + "_Thresholds_Ori_Near"); - cfg.thresholdOrientationReached = getValue<float>(values, name + "_Thresholds_Ori_Reached"); - cfg.thresholdPositionNear = getValue<float>(values, name + "_Thresholds_Pos_Near"); - cfg.thresholdPositionReached = getValue<float>(values, name + "_Thresholds_Pos_Reached"); + getValueFromMap(cfg.thresholdOrientationNear, values, name + "_Thresholds_Ori_Near"); + getValueFromMap(cfg.thresholdOrientationReached, values, name + "_Thresholds_Ori_Reached"); + getValueFromMap(cfg.thresholdPositionNear, values, name + "_Thresholds_Pos_Near"); + getValueFromMap(cfg.thresholdPositionReached, values, name + "_Thresholds_Pos_Reached"); - cfg.maxOriVel = getValue<float>(values, name + "_Max_vel_ori"); - cfg.maxPosVel = getValue<float>(values, name + "_Max_vel_pos"); - cfg.kpOri = getValue<float>(values, name + "_KP_ori"); - cfg.kpPos = getValue<float>(values, name + "_KP_pos"); + getValueFromMap(cfg.maxOriVel, values, name + "_Max_vel_ori"); + getValueFromMap(cfg.maxPosVel, values, name + "_Max_vel_pos"); + getValueFromMap(cfg.kpOri, values, name + "_KP_ori"); + getValueFromMap(cfg.kpPos, values, name + "_KP_pos"); } } diff --git a/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.h b/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.h index ca43720fa07154d3067941a7f9ec496f2e43bd26..238ba2ae38f1f20aeba20604c62c86f1e432488b 100644 --- a/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.h +++ b/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.h @@ -31,15 +31,7 @@ namespace armarx::RemoteGui detail::GroupBoxBuilder makeConfigGui( const std::string& name, const CartesianWaypointControllerConfig& val); -} -namespace armarx::RemoteGui::detail::_getValue -{ - template<> - struct GetValueOutputParameter <CartesianWaypointControllerConfig, void> : std::true_type - { - static void call( - CartesianWaypointControllerConfig& cfg, - RemoteGui::ValueMap const& values, std::string const& name); - }; + void getValueFromMap(CartesianWaypointControllerConfig& cfg, + RemoteGui::ValueMap const& values, std::string const& name); } diff --git a/source/RobotAPI/libraries/ControllerUIUtility/NJointCartesianWaypointControllerConfig/RemoteGui.cpp b/source/RobotAPI/libraries/ControllerUIUtility/NJointCartesianWaypointControllerConfig/RemoteGui.cpp index fece7f9254cc646114adec271f5c931a92b47432..dc6aadb5ad0b72d8ebe19ad8e8f1b21b3a8b7d9b 100644 --- a/source/RobotAPI/libraries/ControllerUIUtility/NJointCartesianWaypointControllerConfig/RemoteGui.cpp +++ b/source/RobotAPI/libraries/ControllerUIUtility/NJointCartesianWaypointControllerConfig/RemoteGui.cpp @@ -49,16 +49,13 @@ namespace armarx::RemoteGui return builder; } -} -namespace armarx::RemoteGui::detail::_getValue -{ - void GetValueOutputParameter <NJointCartesianWaypointControllerRuntimeConfig, void>::call( - NJointCartesianWaypointControllerRuntimeConfig& cfg, - RemoteGui::ValueMap const& values, std::string const& name) + + void getValueFromMap(NJointCartesianWaypointControllerRuntimeConfig& cfg, + RemoteGui::ValueMap const& values, std::string const& name) { - getValue(cfg.wpCfg, values, name); - getValue(cfg.forceThreshold, values, name + "_forceThreshold"); - getValue(cfg.forceThresholdInRobotRootZ, values, name + "_forceThresholdInRobotRootZ"); - getValue(cfg.optimizeNullspaceIfTargetWasReached, values, name + "_optimizeNullspaceIfTargetWasReached"); + getValueFromMap(cfg.wpCfg, values, name); + getValueFromMap(cfg.forceThreshold, values, name + "_forceThreshold"); + getValueFromMap(cfg.forceThresholdInRobotRootZ, values, name + "_forceThresholdInRobotRootZ"); + getValueFromMap(cfg.optimizeNullspaceIfTargetWasReached, values, name + "_optimizeNullspaceIfTargetWasReached"); } } diff --git a/source/RobotAPI/libraries/ControllerUIUtility/NJointCartesianWaypointControllerConfig/RemoteGui.h b/source/RobotAPI/libraries/ControllerUIUtility/NJointCartesianWaypointControllerConfig/RemoteGui.h index f06371d4fe96ec51fcafbf80fb9a999e86f697f3..f8b06a1a00c52963ff590e196ba95c97bdb3cefb 100644 --- a/source/RobotAPI/libraries/ControllerUIUtility/NJointCartesianWaypointControllerConfig/RemoteGui.h +++ b/source/RobotAPI/libraries/ControllerUIUtility/NJointCartesianWaypointControllerConfig/RemoteGui.h @@ -32,19 +32,7 @@ namespace armarx::RemoteGui const std::string& name, const NJointCartesianWaypointControllerRuntimeConfig& val); - template <> - NJointCartesianWaypointControllerRuntimeConfig getValue<NJointCartesianWaypointControllerRuntimeConfig>( - ValueMap const& values, - std::string const& name); -} -namespace armarx::RemoteGui::detail::_getValue -{ - template<> - struct GetValueOutputParameter <NJointCartesianWaypointControllerRuntimeConfig, void> : std::true_type - { - static void call( - NJointCartesianWaypointControllerRuntimeConfig& cfg, - RemoteGui::ValueMap const& values, std::string const& name); - }; + void getValueFromMap(NJointCartesianWaypointControllerRuntimeConfig& cfg, + RemoteGui::ValueMap const& values, std::string const& name); } diff --git a/source/RobotAPI/libraries/core/PIDController.cpp b/source/RobotAPI/libraries/core/PIDController.cpp index 0b2dd67089394ee5c219ec66d919eb4d07a4f927..d3b4eb51940bfdf8dbefb2daf7809c1e9d27c7a4 100644 --- a/source/RobotAPI/libraries/core/PIDController.cpp +++ b/source/RobotAPI/libraries/core/PIDController.cpp @@ -26,6 +26,7 @@ #include <ArmarXCore/core/time/TimeUtil.h> #include <RobotAPI/libraries/core/math/MathUtils.h> #include <ArmarXCore/core/exceptions/local/ExpressionException.h> +#include <ArmarXCore/observers/filters/rtfilters/RTFilterBase.h> #include <ArmarXCore/observers/filters/rtfilters/ButterworthFilter.h> #include <memory> diff --git a/source/RobotAPI/libraries/core/PIDController.h b/source/RobotAPI/libraries/core/PIDController.h index 4e17ef0d016a6c12400b4192e993f4e9b10993ae..9e183e77050ab09abf3a5e1b1daa309b087eccf5 100644 --- a/source/RobotAPI/libraries/core/PIDController.h +++ b/source/RobotAPI/libraries/core/PIDController.h @@ -27,7 +27,6 @@ #include "MultiDimPIDController.h" #include <ArmarXCore/core/logging/Logging.h> -#include <ArmarXCore/observers/filters/rtfilters/RTFilterBase.h> #include <Eigen/Core> @@ -36,6 +35,11 @@ namespace armarx { + namespace rtfilters + { + class RTFilterBase; + } + class PIDController : public Logging { @@ -77,8 +81,8 @@ namespace armarx bool firstRun; bool limitless; bool threadSafe = true; - rtfilters::RTFilterBasePtr differentialFilter; - rtfilters::RTFilterBasePtr pdOutputFilter; + std::shared_ptr<rtfilters::RTFilterBase> differentialFilter; + std::shared_ptr<rtfilters::RTFilterBase> pdOutputFilter; private: using ScopedRecursiveLock = std::unique_lock<std::recursive_mutex>; using ScopedRecursiveLockPtr = std::unique_ptr<ScopedRecursiveLock>; diff --git a/source/RobotAPI/libraries/core/math/MathUtils.h b/source/RobotAPI/libraries/core/math/MathUtils.h index 7a7fb5c8dd21363e246ad3a45bfbcdb304640f8b..4944430b100596e3336d6feeb2b45870b5258d8c 100644 --- a/source/RobotAPI/libraries/core/math/MathUtils.h +++ b/source/RobotAPI/libraries/core/math/MathUtils.h @@ -22,9 +22,9 @@ #pragma once -#include <math.h> -#include <Eigen/Eigen> +#include <Eigen/Core> #include <vector> +#include <math.h> namespace armarx::math {