diff --git a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp index 72df5f416808f1a35d2fc1da762cf32bb2c35e09..f712c2ecd934d4f702c37c3c689b6ff4e2e7fdcc 100644 --- a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp +++ b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp @@ -940,14 +940,15 @@ QString KinematicUnitWidgetController::translateStatus(ErrorStatus status) void KinematicUnitWidgetController::updateJointAnglesTable() { - if (!robotNodeSet) - { - return; - } + float dirty_squaresum = 0; boost::recursive_mutex::scoped_lock lock(mutexNodeSet); + if (!robotNodeSet) + { + return; + } std::vector< RobotNodePtr > rn = robotNodeSet->getAllRobotNodes(); @@ -983,13 +984,17 @@ void KinematicUnitWidgetController::updateJointAnglesTable() void KinematicUnitWidgetController::updateJointVelocitiesTable() { - if (!getWidget() || !robotNodeSet) + if (!getWidget()) { return; } float dirty_squaresum = 0; boost::recursive_mutex::scoped_lock lock(mutexNodeSet); + if (!robotNodeSet) + { + return; + } std::vector< RobotNodePtr > rn = robotNodeSet->getAllRobotNodes(); QTableWidgetItem* newItem; @@ -1019,12 +1024,13 @@ void KinematicUnitWidgetController::updateJointVelocitiesTable() void KinematicUnitWidgetController::updateJointTorquesTable() { + + + boost::recursive_mutex::scoped_lock lock(mutexNodeSet); if (!getWidget() || !robotNodeSet) { return; } - - boost::recursive_mutex::scoped_lock lock(mutexNodeSet); std::vector< RobotNodePtr > rn = robotNodeSet->getAllRobotNodes(); QTableWidgetItem* newItem; NameValueMap::const_iterator it; @@ -1046,12 +1052,13 @@ void KinematicUnitWidgetController::updateJointTorquesTable() void KinematicUnitWidgetController::updateJointCurrentsTable() { + + + boost::recursive_mutex::scoped_lock lock(mutexNodeSet); if (!getWidget() || !robotNodeSet) { return; } - - boost::recursive_mutex::scoped_lock lock(mutexNodeSet); std::vector< RobotNodePtr > rn = robotNodeSet->getAllRobotNodes(); QTableWidgetItem* newItem; NameValueMap::const_iterator it; @@ -1073,12 +1080,13 @@ void KinematicUnitWidgetController::updateJointCurrentsTable() void KinematicUnitWidgetController::updateJointMotorTemperaturesTable() { + + boost::recursive_mutex::scoped_lock lock(mutexNodeSet); if (!getWidget() || !robotNodeSet) { return; } - boost::recursive_mutex::scoped_lock lock(mutexNodeSet); std::vector< RobotNodePtr > rn = robotNodeSet->getAllRobotNodes(); QTableWidgetItem* newItem; NameValueMap::const_iterator it; @@ -1198,13 +1206,14 @@ void KinematicUnitWidgetController::reportJointStatuses(const NameStatusMap& joi void KinematicUnitWidgetController::updateModel() { + + + // ARMARX_INFO << "updateModel()" << flush; + boost::recursive_mutex::scoped_lock lock(mutexNodeSet); if (!robotNodeSet) { return; } - - // ARMARX_INFO << "updateModel()" << flush; - boost::recursive_mutex::scoped_lock lock(mutexNodeSet); std::vector< RobotNodePtr > rn2 = robotNodeSet->getAllRobotNodes(); std::vector< RobotNodePtr > usedNodes;