-
Notifications
You must be signed in to change notification settings - Fork 31
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
Now the joints can run based only to motor encoder - without AMO sensors - and calibrate in hard stop. #438
Conversation
…ors - and calibrate in hard stop.
Hi @ale-git, |
We did some tests at higher and slower velocity: all is ok 20231108_183516.mp420231108_183215.mp4 |
In the motion control library there was still a missing step to be able to control a joint with only motor encoder, hard stop calibrated, with a EMS+2FOC architecture: before starting the hard stop calibration procedure the EMS must wait that the 2FOC itself is calibrated (rotor encoder idex found), otherwise we'll have a hard stop false detection caused by the fact that the 2FOC controlled motor doesn't move until the 2FOC is internally calibrated. In fact, the hard stop detection is base on a timeout euristics: the EMS commands a calibration PWM to the 2FOC, and if the joint doesn't move for a certain time it is assumed that the hard stop is reached. For the reason above, it was already working on MC4+ boards but not on EMS+2FOC boards. Now this PR fixes this gap, providing the right synchronization between EMS and 2FOC during hard stop calibration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ale-git ,
I reported in the review comments some small changes that I think they are necessary.
After the changes, a the fw should be tested again.
Since the modifications consist in comments and two not used variables I'm going to rebuild the .hex (the amc has still to be done anyway), but there is no need to test it again. Generally speaking, I suggest that our workflow should be corrected: if you want to review the PRs line by line it is well appreciated, but it should be done before the firmware is tested working properly, not after. Testing is a very time consuming activity, and modifications to a already tested and working version makes the previous test a useless waste of time. |
as discussed f2f with @ale-git, we decided that in the If in the future we want to make those thresholds parametrized, we just need to set the new parameter in the We also agreed, that more tests are no longer necessary. |
Yes, I agree with you. we need to plan testing activities better. |
I pushed all the required changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK @ale-git, thanks
At present, robots like iCub 3 and ErgoCub can use AMO sensors in incremental mode with hard stop calibration.
This new version allows the same robots to run without AMO sensors at all, only relying on motor encoders.
Build PR robotology/icub-firmware-build#112