Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GazeboYarpControlBoardDriver getPidErrors seems to not work properly for torque PID #556

Open
Nicogene opened this issue Jun 10, 2021 · 0 comments

Comments

@Nicogene
Copy link
Member

In robotology/robometry#137 @isorrentino experienced the same issue of #555, getPidErrors seems to return false.

Moreover, getPidErrors seem to return always the position error, independently from the vocab passed to the fuction

bool GazeboYarpControlBoardDriver::getPidError(const PidControlTypeEnum& pidtype, int j, double *err)
{
PIDMap::iterator pidType = m_pids.find(pidtype);
if (pidType == m_pids.end()) {
yWarning() << "Could not find PID for type " << pidtype;
return false;
}
if (j < 0 || static_cast<size_t>(j) >= pidType->second.size()) {
yWarning() << "Joint index must be between 0 and " << pidType->second.size();
return false;
}
*err = (m_positions[j] - m_zeroPosition[j]) - m_motReferencePositions[j];
return true;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant