robotology / robots-configuration

Contains robots configuration files
BSD 3-Clause "New" or "Revised" License
14 stars 69 forks source link

Check and validate ergoCub wrist-mk2.x gear ratios #569

Closed pattacini closed 1 year ago

pattacini commented 1 year ago

As of now, the FW relies on these values:

https://github.com/robotology/robots-configuration/blob/151cd3936d34d5d2a59f0c2de66ecb3a6e27d2bd/ergoCubSN000/hardware/mechanicals/left_arm-eb31-j4_6-mec.xml#L14-L15

We need to check their correctness (both the ratios) wrt the CAD and the fact that the mechanism is coupled.

Here's our present documentation (provided by @divyashah) saying that the motor speed-reducer ratio is 196:1 and the belt drive ratio is 2:1:

Perhaps, the parallel kinematics has an impact here, in the way we'd need to convert those values in the conf files @ale-git?

cc @valegagge @lawproto @mfussi66 @Nicogene @andreaderito @maggia80

pattacini commented 1 year ago

Weird enough, $196 \times 1.778 = 348.44$, which is similar to $384.44$ with 2 digits swapped.

mfussi66 commented 1 year ago

and the belt drive ratio is 2:1

This is caused by the number of teeth of the two pulleys: 28/14.

Lawproto commented 1 year ago

Weird enough, 196×1.778=348.44, which is similar to 384.44 with 2 digits swapped.

Yeah, @pattacini! @simeonedussoni noticed the same thing. And, weird enough again, the number with the digits swapped is close enough to $196 \times 2=392$, which is the number I would expect given our current parameters. It seems that two wrongs do make a right, sometimes.

This is caused by the number of teeth of the two pulleys: 28/14.

Given the 1.778 oddball, I checked on the teeth of the pulleys again. I confirm it is as @mfussi66 said.

immagine immagine

I have no idea where that number came from in the first place.

pattacini commented 1 year ago

Ok, thanks @Lawproto!

I'll open up a PR to fix the values. The documentation is correct.

pattacini commented 1 year ago

PR opened in:

@simeonedussoni @valegagge, remember to update the values in the test setup of the new wrist.

mfussi66 commented 1 year ago

The E2J parameter inevitably has an effect on the decoupler, since it uses the angle of the driven pulley to compute the direct kinematics.

valegagge commented 1 year ago

PR opened in:

@simeonedussoni @valegagge, remember to update the values in the test setup of the new wrist.

Yes for sure! we noticed the problem while we were configuring the wrist MK2.1 setup!

maggia80 commented 1 year ago

looking at the model in Simscape it turns out that: image

the ratio is 1.777

pattacini commented 1 year ago

I'll check it out and, if it's the case, I'll open an issue at https://github.com/robotology/icub-firmware-models.

pattacini commented 1 year ago

Hi @maggia80

We do generate the code of the controller only, as per https://github.com/robotology/icub-firmware-models/tree/master/wrist_mk2_1#embedded-firmware-generation.

The ratio is hand-coded in the model but used only for simulation. At any rate, I'll open up a PR to fix them up.

pattacini commented 1 year ago

Here's the PR:

Lawproto commented 1 year ago

I would like to take a look at the Simscape model, where can I find it?

pattacini commented 1 year ago

I would like to take a look at the Simscape model, where can I find it?

You ought to download the repo https://github.com/robotology/icub-firmware-models and then open up the MATLAB project https://github.com/robotology/icub-firmware-models/blob/master/wrist_mk2_1/spherical_wrist.prj (using the latest release R2023b).