diff --git a/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.cpp b/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.cpp index d55f7356304ccfb037d43b53bcf7cb26cc18b88f..a568893eb8448825f471ceb44f31944e3bdab56b 100644 --- a/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.cpp +++ b/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.cpp @@ -156,24 +156,24 @@ namespace armarx::RemoteGui ); } - void getValue(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 5f1ff1c435217d0bd7fd0758c259c0ab8847d15b..238ba2ae38f1f20aeba20604c62c86f1e432488b 100644 --- a/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.h +++ b/source/RobotAPI/libraries/ControllerUIUtility/CartesianWaypointControllerConfig/RemoteGui.h @@ -32,6 +32,6 @@ namespace armarx::RemoteGui const std::string& name, const CartesianWaypointControllerConfig& val); - void getValue(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 c360d51b4e0e4fd5ac3fd2eeb3130ce44f569d34..dc6aadb5ad0b72d8ebe19ad8e8f1b21b3a8b7d9b 100644 --- a/source/RobotAPI/libraries/ControllerUIUtility/NJointCartesianWaypointControllerConfig/RemoteGui.cpp +++ b/source/RobotAPI/libraries/ControllerUIUtility/NJointCartesianWaypointControllerConfig/RemoteGui.cpp @@ -50,12 +50,12 @@ namespace armarx::RemoteGui return builder; } - void getValue(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 29f90e3c4c04ae26139b54a01524ba1396142191..f8b06a1a00c52963ff590e196ba95c97bdb3cefb 100644 --- a/source/RobotAPI/libraries/ControllerUIUtility/NJointCartesianWaypointControllerConfig/RemoteGui.h +++ b/source/RobotAPI/libraries/ControllerUIUtility/NJointCartesianWaypointControllerConfig/RemoteGui.h @@ -32,11 +32,7 @@ namespace armarx::RemoteGui const std::string& name, const NJointCartesianWaypointControllerRuntimeConfig& val); - template <> - NJointCartesianWaypointControllerRuntimeConfig getValue<NJointCartesianWaypointControllerRuntimeConfig>( - ValueMap const& values, - std::string const& name); - void getValue(NJointCartesianWaypointControllerRuntimeConfig& cfg, - RemoteGui::ValueMap const& values, std::string const& name); + void getValueFromMap(NJointCartesianWaypointControllerRuntimeConfig& cfg, + RemoteGui::ValueMap const& values, std::string const& name); }