Skip to content

Commit

Permalink
Avoid calling IPositionDirect::getRefPositions
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Mar 11, 2019
1 parent 406ea26 commit f684af1
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -588,19 +588,11 @@ void roboticslab::BasicCartesianControl::movi(const std::vector<double> &x)
return;
}

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

if (!iPositionDirect->getRefPositions(qRef.data()))
{
CD_ERROR("getRefPositions failed.\n");
return;
}

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

for (int i = 0; i < numRobotJoints; i++)
{
qd[i] = q[i] - qRef[i];
qd[i] = q[i] - currentQ[i];
}

if (!checkJointLimits(currentQ, qd))
Expand Down

0 comments on commit f684af1

Please sign in to comment.