Closed rirze closed 4 years ago
This is a very critical issue-- as I did not account for time it takes for the robot to adjust position accordingly after any issued commands.
As desired, I've added a wait_until_idle
command under Mirobot
. Futhermore, I've integrated this with all default operations, so it doesn't need to be explicitly invoked after each command.
So now, a cleaned up version of OP's code now works as expected:
from mirobot import Mirobot
with Mirobot(debug=True, wait=True) as m:
m.home_simultaneous()
print(m.status.cartesian)
for count in range(5):
mx = 180.00
my = 0.00 + count * 5
mz = 170 + count * 5
print(f"************Count {count}**********")
m.go_to_cartesian_ptp(mx, my, mz)
print(m.status.cartesian)
This will be updated in a new commit on master
soon.