Is there a <axis>.isBusy command or something similar Python


#1

i’m trying to do some testing for a project. i would like to check if the motor is still spinning. is there a function that will return a bool value if the motors are still spinning.

For example, i was originally using stepper motors for this project and a driver called Slush Engine. in there code the was a method called .isBusy() that would return a true if the motors were moving.


#2

I don’t think there is something like isBusy(). Perhaps you could keep track of the estimated speed indicated by the encoder?
<axis>.encoder.vel_estimate


#3

If you are using the trajectory module, you can check the controller.config.control_mode state to see if it has finished:

trajectory_pos_state


#4

I’ll try that, thanks