I need to run a control loop for a robot at 80Hz in Python.
Obviously there are various ways to do this using time/datetime etc, starting each loop iteration once dt has elapsed.
I have two questions:
1) I have heard that when using time/datetime, the values may not always be accurate at the milliseconds level. Thoughts?
2) Clearly the program will be running on top of Raspbian, and so it is not guaranteed that the program will make 80Hz every time. Is there anything I can strip down to make this more likely?
Any help much appreciated.