-
Hi, What is the correct way to interpret the readings of iMotorEncoders? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 16 comments
-
/cc @randaz81 |
Beta Was this translation helpful? Give feedback.
-
Have you tried to see what getGearboxRatio returns? |
Beta Was this translation helpful? Give feedback.
-
Nope, can try that. |
Beta Was this translation helpful? Give feedback.
-
Yes, indeed you have to divide the position returned by iMotorEncoders by the gear ratio obtained by getGearBoxRatio, considering also the sign. Additionally, you have to remove the offset which affects the motor encoder (indeed they are relative encoder, not absolute encoders). check |
Beta Was this translation helpful? Give feedback.
-
I get false from getGearboxRatio and so nonsense gear ratio, is the integer number m of the arguments ranging from 0 to 5 for example in the case of left_leg?
|
Beta Was this translation helpful? Give feedback.
-
yes, it is. For the legs legs it should return *val= +-100. |
Beta Was this translation helpful? Give feedback.
-
Ok, but it return false and val = 0. And also the function
And the iEncoders and iMotorEncoders seem to work fine. |
Beta Was this translation helpful? Give feedback.
-
Looking at git history, icub-main has be updated at least at 04 July to properly manage getGearboxRatio. Is it so? |
Beta Was this translation helpful? Give feedback.
-
icub-main is updated up to 04/09/2015, as well as yarp. But the firmware is from June. |
Beta Was this translation helpful? Give feedback.
-
@hu-yue any progress on this? |
Beta Was this translation helpful? Give feedback.
-
@pattacini not yet, sorry, I just got back from Hamburg but have to leave for Delft already so I did not have time to check the firmware issue with @randaz81, maybe we can do it next week? |
Beta Was this translation helpful? Give feedback.
-
there's no hurry, was just a ping 😏 |
Beta Was this translation helpful? Give feedback.
-
After the last firmware and software update now it's possible to read the gear ratio using |
Beta Was this translation helpful? Give feedback.
-
yes 10^-2 deg is ok. |
Beta Was this translation helpful? Give feedback.
-
Ok thanks! |
Beta Was this translation helpful? Give feedback.
-
fyi @fjandrad |
Beta Was this translation helpful? Give feedback.
Yes, indeed you have to divide the position returned by iMotorEncoders by the gear ratio obtained by getGearBoxRatio, considering also the sign. Additionally, you have to remove the offset which affects the motor encoder (indeed they are relative encoder, not absolute encoders). check
opticalEncoders-consistency
inicub-tests
for an example