Skip to content
Snippets Groups Projects
Commit f9c5ca92 authored by Mirko Wächter's avatar Mirko Wächter
Browse files
* 'master' of https://i61wiki.itec.uka.de/git/robot-api:
  ensured correct waiting behaviour on request and release
  Adjusted gitignore to new versions of qtcreator

Conflicts:
	source/RobotAPI/components/units/TCPControlUnit.cpp
parents b745aa22 4a20aff0
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ source/*/Test.h
.DS_Store
CMakeFiles
CMakeCache.txt
CMakeLists.txt.user
CMakeLists.txt.user*
*.o
*.os
......
......@@ -143,12 +143,15 @@ namespace armarx
ARMARX_VERBOSE << "Setting new Velocity for " << nodeSetName << " in frame " << translationVelocity->frame << ":\n" << FramedVector3Ptr::dynamicCast(translationVelocity)->toEigen();
if(orientationVelocityRPY)
ARMARX_VERBOSE << "Orientation Velo in frame " << orientationVelocityRPY->frame << ": \n" << FramedVector3Ptr::dynamicCast(orientationVelocityRPY)->toEigen();
TCPVelocityData data;
data.nodeSetName = nodeSetName;
data.translationVelocity = FramedVector3Ptr::dynamicCast(translationVelocity);
data.orientationVelocity = FramedVector3Ptr::dynamicCast(orientationVelocityRPY);
if(tcpName.empty())
{
data.tcpName = jointExistenceCheckRobot->getRobotNodeSet(nodeSetName)->getTCP()->getName();
}
else
{
ARMARX_CHECK_EXPRESSION_W_HINT(jointExistenceCheckRobot->hasRobotNode(tcpName), "The robot does not have the node: " + tcpName);
......@@ -156,11 +159,6 @@ namespace armarx
data.tcpName = tcpName;
}
tcpVelocitiesMap[data.tcpName] = data;
// if(translationVelocity)
// targetTranslationVelocities[nodeSetName] = translationVelocity;
// if(orientationVelocityRPY)
// targetOrientationVelocitiesRPY[nodeSetName] = orientationVelocityRPY;
}
......@@ -199,7 +197,10 @@ namespace armarx
ScopedLock lock(dataMutex);
requested = true;
if(execTask)
{
while (calculationRunning) IceUtil::ThreadControl::yield();
execTask->stop();
}
lastReportTime = IceUtil::Time::now();
execTask = new PeriodicTask<TCPControlUnit>(this, &TCPControlUnit::periodicExec, cycleTime, false, "TCPVelocityCalculator");
execTask->start();
......@@ -258,7 +259,7 @@ namespace armarx
if (requested)
{
IceUtil::Time startTime = IceUtil::Time::now();
//IceUtil::Time startTime = IceUtil::Time::now();
calcAndSetVelocities();
ARMARX_INFO << deactivateSpam(10) << "Time for calcAndSetVelocities(): " << (IceUtil::Time::now()-startTime).toMilliSeconds() << " ms";
}
......
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