xArm-Python-SDK icon indicating copy to clipboard operation
xArm-Python-SDK copied to clipboard

Question: Understanding swapping modes and states

Open tungalbert99 opened this issue 11 months ago • 3 comments

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?

tungalbert99 avatar Mar 08 '24 21:03 tungalbert99

image why does setting collision detection and then setting servo mode immediately after cause it to swap position mode?

tungalbert99 avatar Mar 11 '24 20:03 tungalbert99

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.

penglongxiang avatar Mar 12 '24 02:03 penglongxiang

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).

tungalbert99 avatar Mar 12 '24 04:03 tungalbert99