Last active
September 14, 2016 12:42
-
-
Save jokla/b2cb081e355fce52bb7bdf4463621696 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (unsigned i = 0 ; i < jointVel.getSize() ; ++i) | |
{ | |
float vel = jointVel[i]; | |
AL::ALValue limits = m_motionProxy->getLimits(jointName[i]); | |
if (vel > 0.0f) | |
angles.arrayPush(limits[0][1]); //max | |
else if (vel < 0.0f) | |
angles.arrayPush(limits[0][0]); //min | |
float fraction = fabs( float (vel/float(limits[0][2]))); | |
fractions.push_back(fraction); | |
} | |
m_motionProxy->setAngles(jointNames,angles,fractions); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment