Serial Timeout Issue


#1

I have been working on building a serial controller to send the ODrive serial commands, and I seem to be running into an issue with the serial connection every once in awhile.

My goal is to be able to run a system using the setvelocity command being able to send a command at most 20 times a second. I am running into an issue while sending commands at around 2 or 3 commands a second with the serial seemingly timing out. The motors stop spinning, and I can’t send or receive anything to or from the ODrive.

Is there a checksum that I can look for after sending a command to check to see if the command was received before sending another?

Thanks,
wayneStock


#2

Hi,
may be you have the same problem.


It’s already on the issue list.

Greetings / Zennix


#3

Thanks Zennix. It appears that I missed that in my research on the issue.

Since it hasn’t been resolved in the firmware as of yet, are you continuing on with the commented portion fix?

Also, anyone know how high the priority is on this fix?

waynStock


#4

Hi waynStock,

I’m testing with the commented out section. I do not need to write parameters in my project.
Hopefully it will be fixed in the next month. But madcowswe can answer exactly.

Greetings / Zennix


#5

So are you precalibrating the motors or having them autocalibrate on turn on?

Also, are you editing the code using vscode or eclipse?


#6

Hi,

I’m using the autocalibration at startup. But I have no load now, should change in future.
My OS is Windows 10 and my tool is VScode.

Greetings / Zennix


#7

Thanks Zennix,

I will check into setting up VSCode to modify the source code. Although, I think I am going to start up a similar project using python until there is a fix for the issue.

wayneStock


#8

@wayneStock Are sending serial over the USB CDC interface, or over UART?


#9

I was using the USB CDC Interface.


#10

There is bug we are working on fixing which means that there may be collisions between the two interfaces.
Can you try to disable the native interface in device manager?


#11

I will look into it, hopefully by the end of the weekend.

Thanks for looking into it.

waynestock


#12

Hi,

first test with devel branch -> the communication breaks.
second test with deactivated native device in device manager -> communication breaks too.
third test with commented out parts of “else if (cmd[0] == ‘w’) { // write property” in the ascii_protocol.cpp -> communication runs without problems.

Greetings / Zennix


#13

I also attempted to test the serial communication again by disabling the native interface. It appears that the communication still breaks. I decided to lower the rate to about 10 calls a second; and it still breaks after a bit.

wayneStock


#14

Okay thanks for trying. I have made a separate issue on github to track this.

Can you guys help me out with some details that will help me to reproduce the issue here? What is your OS, what commands are you sending? using what program? Other details? Thanks!


#15

Hi Oscar,

OS = Win10.
Testprpogram: https://drive.google.com/open?id=1kKuIi_Zo5Npc25uD6jVV-5sX5PyVmX6X

Settings:
grafik

Set about 30 Repetitions.

Greetings / Zennix


#16

Do you have the source for this program, so I can dig in in case I need to?


#17

Sure,
https://drive.google.com/open?id=1kKuIi_Zo5Npc25uD6jVV-5sX5PyVmX6X

It’s in C# VS2017.

Greetings / Zennix


#18

I will work on getting you my program as well.

I am using a Windows 10 Machine with C++ Qt 5.10


#19

What’s the status on this?

I’ve been struggling with faulting serial on my Ofrive for a few weeks and finally realized that it’s on the ODrive side.

Anyway…any quick fixes? I’m talking UART via arduino and using the example program as a guide.

Is there a way to make it wake back up? It crashes my robot and I have to do a reboot.

I haven’t tested switching to say Idle mode and then back? Does anyone know if there’s a hack work around? Or some command that can re-establish the serial connection.


End switches an interrupts
#20

Did you solve the problem?