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

[SDK] Get Error Code #104

Closed
MusubaPy opened this issue Jan 2, 2022 · 8 comments
Closed

[SDK] Get Error Code #104

MusubaPy opened this issue Jan 2, 2022 · 8 comments

Comments

@MusubaPy
Copy link

MusubaPy commented Jan 2, 2022

Greetings,

I went to this for a long time and finally I was able to completely assemble your project.

I ran into a problem: I sometimes get an error while running example.cpp.

I cannot understand what the error might be related to. Sometimes an error occurs when torque is applied to the links. Sometimes it occurs when I send a position to a link.

I am trying to use the GetErrorCode() function, but I am not getting the desired result.

P.S. I only use half of the drivers and motors.

image

@thomasfla
Copy link
Member

Dear Roaman,

The error codes are declared here https://github.com/open-dynamic-robot-initiative/udriver_firmware/blob/782998348fbe88158f398aadde11c36a4162ba12/firmware/mw_dual_motor_torque_ctrl/src/spiapi.h#L167

The Error 1 and 6 correspond to encoder errors, this can happen if the electrical connection with the encoder is bad, or if the encoder code wheel is damaged/miss aligned.

Maybe some context on how such error is triggered might help you to solve your issue.
The encoders are incremental, and the impulses are integrated to know the position. In addition to that, the encoders have an index pulse that are fired every motor turns. To check if we loose encoder steps, we check every time the index pulse is seen if the position has varied of exactly one turn. This explains why the error is not triggered instantly, but only after the encoder sees an index pulse, so after manually turning the joint, or commanding a move.

I hope this helps,

We should better document the error codes and write some troubleshooting section somewhere. I will try to work on this soon.

@thomasfla
Copy link
Member

related to #70

@dvogureckiy99
Copy link

dvogureckiy99 commented Oct 13, 2022

@thomasfla Sorry, what does it mean: " Encoder 1 error too high" ?

@thomasfla
Copy link
Member

Hi, the encoder is equiped with an index line (impulse at every motor turn) in the firmware of the udriver, we check that at every index interrupt, we have moved from one (or minus one) full turn (with some margin threshold)
If we don't, this means we have lost some encoders ticks, and we don't know where we are. This is error 1.

This can be caused by:

  • Dirty/ misaligned code wheel
  • Bad connection on the encoder wires / connector
  • Extreme electromagnetic perturbations

Hoping this helps..

@dvogureckiy99
Copy link

dvogureckiy99 commented Oct 14, 2022

@thomasfla Thank you very much, but it error happens after my motors turn around a little. After the shaft makes one revolution, an error occurs.

If I take the encoder separately from the Hip FE right front foot module and insert the code wheel into it so that side A is closer to the code wheel, then pulses appear at the output I.

I took the encoder from the module of the right front leg of the ULM and inserted the code wheel into it so that side A was closer to the running wheel. There are pulses at the output I.

I realized my mistake, I ordered Broadcom AEDT-9810-Z00 encoder, but I forgot to print and put the corresponding Codewheel PWB Mounts Encoder. Because of this, the gaps between codewheel and encoder side A, B were incorrect.

Maybe it will help someone else.

@dvogureckiy99
Copy link

dvogureckiy99 commented Dec 22, 2022

@thomasfla Hi, again, I putted the corresponding Codewheel PWB Mounts Encoder and I have got impulses on the pin I on the udriver, i.e. impulses of the encoder index line (impulse at every motor turn),
Screenshot_1
but I still getting error 6 or 1 while the position is read well.
Screenshot from 2022-12-22 21-29-46

@thomasfla
Copy link
Member

Hi,

This still resemble in a misaligned code week.
You can have a look at the encoder datasheet to get an idea of the mechanical tolerances.

You can also probe the a, b and I line together with a scope or a logic analyser so help troubleshooting.

Best,
thomas.

@dvogureckiy99
Copy link

dvogureckiy99 commented Dec 23, 2022

@thomasfla Thank you, Thomas, and can I ask you: base on the oscillogramm what's wrong with my A,B,I signals. I took a picture with my digital oscilloscope of all three signals A,B,I:
Screenshot_22
Screenshot_19
all parameters are within acceptable limits:
Screenshot_20
Screenshot_21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants