we recently bought two ODrive 3.6. We control them over USB with the python API. I have activated the watchdog timer feature, where I set an timeout to 0.5 seconds. Also I am feeding the watchdog timer over drive.axis0.watchdog_feed(). Everything is working fine, but when I stop my python program, the watchdog timer is triggered and the motors stop spinning. This is also fine, but if I restart my python program, the watchdog timer does not reset, even if I feed it with drive.axis0.watchdog_feed(). So it wont let me control the motors until I reboot the ODrive. Is there a function or something, that I can reset the watchdog timer? I dont want to restart the odrive each time, I restart my python program.
Also it would be great to specify the action, that is executed when the watchdog timer gets triggered. In the moment, the ODrive just disables the motors, but it would be better to stop the motors, so my robot doesnt crash into something.
I hope, someone can help me with this. Thanks in advance!
Thanks, writing 0’s to the .error field did the job! But I couldnt find the function dump_errors in the python library. Anyway the problem is solved, thanks!
Is there an option to specify the action that is applied when the Watchdog timer gets triggered? For example that the motors break instead of just cut the power off. Our robot weighs around 40kg, so when it is on full speed and the program crashes for some reason, it would be better to stop the robot . Otherwise it will crash into something (or someone ).
That’s dangerous, don’t do this. Imagine you’re streaming velocity commands, the comms drop out for a minute so velocity goes to zero, and then suddenly they start going again and the drive suddenly starts moving. That’s an injury waiting to happen.
Yeah I understand that. In my application when the communication is reestablished the velocity commands would always be 0. But my main problem right now is when I turn on my robot, the odrives turn on immediately and time out before my main computer has booted up and running my scripts (which send the watchdog signal). So I was trying to figure out how to reset the odrives to closed loop control once my script is running? But I’m struggling with that.
I’m trying to set the errors = 0 and the set the request state = 8 when my script starts but it doesn’t seem to do anything. Is there anyway of telling the watchdog to wait until it receives the first signal?