Commit 78e955c5 authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux florent@laas.fr
Browse files

Allow access by joint name in entity Dynamic.

parent e20bce56
......@@ -1271,13 +1271,21 @@ CjrlJoint* Dynamic::getJointByName( const std::string& jointName )
else
return m_HDR->rightAnkle()->childJoint(0);
} else {
throw ExceptionDynamic(ExceptionDynamic::GENERIC,
jointName + " is not a valid name."
" Valid names are \n"
"gaze, left-ankle, right-ankle, left-wrist,"
" right-wrist, waist, chest.");
}
else {
std::vector< CjrlJoint* > jv = m_HDR->jointVector ();
for (std::vector< CjrlJoint* >::const_iterator it = jv.begin();
it != jv.end(); it++) {
if ((*it)->getName () == jointName) {
return *it;
}
}
}
throw ExceptionDynamic(ExceptionDynamic::GENERIC,
jointName + " is not a valid name."
" Valid names are \n"
"gaze, left-ankle, right-ankle, left-wrist,"
" right-wrist, waist, chest, or any joint name.");
}
void Dynamic::cmd_createOpPointSignals( const std::string& opPointName,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment