xArm-Python-SDK
xArm-Python-SDK copied to clipboard
Question: Understanding swapping modes and states
There are different ways that the example scripts present how to effectively swap modes. Sometimes it is followed by:
-
arm.reset(wait=True)
-
time.sleep(0.1)
This is dependent on if it is position mode or servo mode. I have seen cases where if I do set_collision_sensitivity
and swap it to servo mode, that the robot will exit servo mode after some time which I assume has to do with this latency. Is there a way to ensure that I have properly swapped to position mode and servo mode?
why does setting collision detection and then setting servo mode immediately after cause it to swap position mode?
Hi, the system configuration change operations like collision sensitivity, operation mode, payload or TCP offset modification will trigger a system reset, which means automatically clearing command buffer, going to mode 0 and setting state to 5. So if you need to do those changes, please configure to the correct mode and state after the re-configurations. Please try giving a small delay in between because some of the automatic switches need some reaction time.
If your issue persists, please provide us a piece of code that can reproduce the phenomenon as well as your controller firmware version. Thanks.
That makes sense! Via the
Please try giving a small delay in between because some of the automatic switches need some reaction time.
Could this be in the lower level call by any chance of collision sensitivity? It seems unfortunate I have to manage the sleep in my upper level calls (and other users would also have to know about this property that isn't documented anywhere).