Skip to content
Snippets Groups Projects
Commit 499fbe05 authored by David Schiebener's avatar David Schiebener
Browse files

lock now locks everything so there are no more segfaults (I hope)

parent b0213ae7
No related branches found
No related tags found
No related merge requests found
...@@ -306,9 +306,9 @@ namespace armarx ...@@ -306,9 +306,9 @@ namespace armarx
{ {
ScopedTryLock lock(dataMutex); ScopedTryLock lock(dataMutex);
if (lock.owns_lock())
{ {
if (lock.owns_lock())
{ {
localTcpVelocitiesMap.clear(); localTcpVelocitiesMap.clear();
TCPVelocityDataMap::iterator it = tcpVelocitiesMap.begin(); TCPVelocityDataMap::iterator it = tcpVelocitiesMap.begin();
...@@ -331,23 +331,23 @@ namespace armarx ...@@ -331,23 +331,23 @@ namespace armarx
RemoteRobot::synchronizeLocalClone(localRobot, robotStateComponentPrx); RemoteRobot::synchronizeLocalClone(localRobot, robotStateComponentPrx);
//ARMARX_DEBUG << "RN TCP R pose2:" << localRobot->getRobotNode("TCP R")->getGlobalPose(); //ARMARX_DEBUG << "RN TCP R pose2:" << localRobot->getRobotNode("TCP R")->getGlobalPose();
} }
}
calculationRunning = true; //calculationRunning = true;
if (requested) if (requested)
{ {
// if((IceUtil::Time::now()-lastCommandTime).toMilliSecondsDouble() > getProperty<float>("MaximumCommandDelay").getValue()) // if((IceUtil::Time::now()-lastCommandTime).toMilliSecondsDouble() > getProperty<float>("MaximumCommandDelay").getValue())
// { // {
// ARMARX_WARNING << "Exceeded MaximumCommandDelay - releasing TCPControlUnit"; // ARMARX_WARNING << "Exceeded MaximumCommandDelay - releasing TCPControlUnit";
// calculationRunning = false; // calculationRunning = false;
// release(); <---- this is a potential deadlock // release(); <---- this is a potential deadlock
// } // }
// else // else
calcAndSetVelocities(); calcAndSetVelocities();
} }
calculationRunning = false; //calculationRunning = false;
}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment