Copied old pid converter from iCub Contrib