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

Improve the Aksim diagnostic when the aksim cable is disconnected #547

Open
valegagge opened this issue Dec 12, 2024 · 3 comments · May be fixed by #549
Open

Improve the Aksim diagnostic when the aksim cable is disconnected #547

valegagge opened this issue Dec 12, 2024 · 3 comments · May be fixed by #549
Assignees
Labels

Comments

@valegagge
Copy link
Member

During some tests performed on three-encoder setup, we noticed that when we disconnect the cable the reported diagnostic refers to other error types:

[ERROR] from BOARD 10.0.1.1 (three-encoders-setup) time=5125s 462m 295u : HW - encoder: not connected (Joint=three_encoders_joint (NIB=0) Number of error in 10 seconds is: 2383) [ERROR] from BOARD 10.0.1.1 (three-encoders-setup) time=5125s 462m 400u : HW - encoder: the position data is not valid (Joint=three_encoders_joint (NIB=0) Number of error in 10 seconds is: 2383) [ERROR] from BOARD 10.0.1.1 (three-encoders-setup) time=5125s 462m 527u : HW - encoder: the position data is valid, but some operating conditions are close to limits. (Joint=three_encoders_joint (NIB=0) Number of error in 10 seconds is: 2415) [ERROR] from BOARD 10.0.1.1 (three-encoders-setup) time=5125s 462m 631u : HW - encoder: inverted CRC is invalid (Joint=three_encoders_joint (NIB=0) Number of error in 10 seconds is: 2431)

It seems that the FW signals all errors together because they are at the same millisecond.

Dod
We want to notify only the error "encoder not connected".

PR with the fix done.

@AntonioViscomi
Copy link

AntonioViscomi commented Dec 16, 2024

WIP

Hi, I have done some testing.
I put the error handling component for the AksIM-2 encoder (which was already written and tested) inside an if/else statement to act, broadly, as follows:

  1. Checks whether a HW error has occurred. If so, the error manager raises the appropriate error message.
  2. If the condition is false, the error manager handles any other error condition (invalid CRC, invalid data, close to limits warning).

The errors are then displayed every 10 seconds.

Here is a zipped folder containing the `.hex' file I flashed on the EMS board.

If the encoder connector is disconnected, the output of the yarprobotinterface is as follows:

[ERROR] from BOARD 10.0.1.1 (three-encoders-setup) time=267s 275m 291u :  MC: AEA encoder invalid data. Hardware problem in the magnetic position sensor of the joint caused invalid position readings. (Joint=three_encoders_joint (NIB=0), encoderPort=0)

[ERROR] from BOARD 10.0.1.1 (three-encoders-setup) time=272s 276m 291u :  MC: AEA encoder invalid data. Hardware problem in the magnetic position sensor of the joint caused invalid position readings. (Joint=three_encoders_joint (NIB=0), encoderPort=0)

[ERROR] from BOARD 10.0.1.1 (three-encoders-setup) time=275s 746m 214u :  HW - encoder: not connected (Joint=three_encoders_joint (NIB=0) Number of error in 10 seconds is: 10001)

[ERROR] from BOARD 10.0.1.1 (three-encoders-setup) time=277s 277m 291u :  MC: AEA encoder invalid data. Hardware problem in the magnetic position sensor of the joint caused invalid position readings. (Joint=three_encoders_joint (NIB=0), encoderPort=0)

[DEBUG] yarprobotinterface running happily

[ERROR] from BOARD 10.0.1.1 (three-encoders-setup) time=282s 278m 291u :  MC: AEA encoder invalid data. Hardware problem in the magnetic position sensor of the joint caused invalid position readings. (Joint=three_encoders_joint (NIB=0), encoderPort=0)

[ERROR] from BOARD 10.0.1.1 (three-encoders-setup) time=285s 747m 214u :  HW - encoder: not connected (Joint=three_encoders_joint (NIB=0) Number of error in 10 seconds is: 10001)

[ERROR] from BOARD 10.0.1.1 (three-encoders-setup) time=287s 279m 291u :  MC: AEA encoder invalid data. Hardware problem in the magnetic position sensor of the joint caused invalid position readings. (Joint=three_encoders_joint (NIB=0), encoderPort=0)

[ERROR] from BOARD 10.0.1.1 (three-encoders-setup) time=292s 280m 291u :  MC: AEA encoder invalid data. Hardware problem in the magnetic position sensor of the joint caused invalid position readings. (Joint=three_encoders_joint (NIB=0), encoderPort=0)

While the HW encoder: not connected component behaves as expected (if the callback runs at 1 k[Hz], 10001 errors are thrown in 10 seconds), there is a debug message concerning the AEA encoder, and at the moment I can't understand if this message is somewhat related to the AksIM.

@valegagge
Copy link
Member Author

Good work @AntonioViscomi !

I guess the error you mentioned above is related to some checks performed by the embedded motion control. Tomorrow we can have a look together!

Please put here the link to the branch of your fix. Thanks

@AntonioViscomi
Copy link

I guess the error you mentioned above is related to some checks performed by the embedded motion control. Tomorrow we can have a look together!

Please put here the link to the branch of your fix. Thanks

Hi @valegagge , here you can find the fix branch.

@AntonioViscomi AntonioViscomi linked a pull request Dec 18, 2024 that will close this issue
@AntonioViscomi AntonioViscomi linked a pull request Dec 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants