Skip to content
Snippets Groups Projects
Commit f23677f4 authored by Nikolaus Vahrenkamp's avatar Nikolaus Vahrenkamp
Browse files

Added interface method for retrieving current hand joint angles

parent 6d926b8e
No related branches found
No related tags found
No related merge requests found
......@@ -150,6 +150,16 @@ NameValueMap HandUnit::getShapeJointValues(const std::string &shapeName, const I
return rc->getRobotNodeJointValueMap();
}
NameValueMap HandUnit::getCurrentJointValues(const Ice::Current &c)
{
NameValueMap result;
for (auto j : handJoints)
{
result[j.first] = 0.0f;
}
return result;
}
void HandUnit::setObjectGrasped(const std::string &objectName, const Ice::Current &)
{
ARMARX_INFO << "Object grasped " << objectName << flush;
......
......@@ -121,6 +121,7 @@ namespace armarx
virtual SingleTypeVariantListBasePtr getShapeNames(const Ice::Current& c = ::Ice::Current());
NameValueMap getShapeJointValues(const std::string &shapeName, const Ice::Current & c = ::Ice::Current());
virtual NameValueMap getCurrentJointValues(const Ice::Current & c = ::Ice::Current());
void setObjectGrasped(const std::string& objectName, const Ice::Current &);
void setObjectReleased(const std::string& objectName, const Ice::Current &);
......
......@@ -81,7 +81,6 @@ namespace armarx
* \warning Not implemented yet!
*/
virtual void setJointAngles(const NameValueMap& jointAngles, const Ice::Current& c = ::Ice::Current());
};
}
......
......@@ -164,10 +164,11 @@ namespace armarx
ScopedLock lock(dataMutex);
ARMARX_CHECK_EXPRESSION_W_HINT(jointExistenceCheckRobot->hasRobotNodeSet(nodeSetName), "The robot does not have the node set: " + nodeSetName);
if(translationVelocity)
ARMARX_VERBOSE << "Setting new Velocity for " << nodeSetName << " in frame " << translationVelocity->frame << ":\n" << FramedDirectionPtr::dynamicCast(translationVelocity)->toEigen();
ARMARX_DEBUG << "Setting new Velocity for " << nodeSetName << " in frame " << translationVelocity->frame << ":\n" << FramedDirectionPtr::dynamicCast(translationVelocity)->toEigen();
if(orientationVelocityRPY)
ARMARX_VERBOSE << "Orientation Velo in frame " << orientationVelocityRPY->frame << ": \n" << FramedDirectionPtr::dynamicCast(orientationVelocityRPY)->toEigen();
ARMARX_DEBUG << "Orientation Velo in frame " << orientationVelocityRPY->frame << ": \n" << FramedDirectionPtr::dynamicCast(orientationVelocityRPY)->toEigen();
TCPVelocityData data;
data.nodeSetName = nodeSetName;
......
......@@ -51,6 +51,7 @@ module armarx
*/
SingleTypeVariantListBase getShapeNames();
NameValueMap getShapeJointValues(string shapeName);
NameValueMap getCurrentJointValues();
string getHandName();
......
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