Skip to content

Commit

Permalink
Remove velocity check on MOVI (p. reverts 99ab1aa)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed May 16, 2019
1 parent e4dc75b commit f8f46ba
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -576,27 +576,23 @@ void roboticslab::BasicCartesianControl::movi(const std::vector<double> &x)
return;
}

std::vector<double> qdot(numRobotJoints);

double interval = yarp::os::Time::now() - movementStartTime;
std::vector<double> qdiff(numRobotJoints);

for (int i = 0; i < numRobotJoints; i++)
{
qdot[i] = (q[i] - currentQ[i]) / interval;
qdiff[i] = q[i] - currentQ[i];
}

if (!checkJointLimits(currentQ, qdot) || !checkJointVelocities(qdot))
if (!checkJointLimits(currentQ, qdiff))
{
CD_ERROR("Joint position or velocity limits exceeded, not moving.\n");
CD_ERROR("Joint position exceeded, not moving.\n");
return;
}

if (!iPositionDirect->setPositions(q.data()))
{
CD_ERROR("setPositions failed.\n");
}

movementStartTime = yarp::os::Time::now();
}

// -----------------------------------------------------------------------------
Expand Down

0 comments on commit f8f46ba

Please sign in to comment.