MG400 - detect when hand-teach button is pressed


#1

hi,

I am operating dobot mg400 with firmware version 1.5.6.0 and controlling it via python API with the latest version on github (https://github.com/Dobot-Arm/TCP-IP-4Axis-Python)

I encountered an issue related to the hand-teach button. Here are the steps that lead to the issue:

  • connect to dobot and enable dobot via python API.
  • Press the hand-teaching button on the forearm and drag the forearm to a point and then press the button again
  • call API to move dobot (example: MovL, MovJ, etc)
    After calling the movement API, I do not see any movement done by dobot. There is no error thrown.

To resolve this, I need to call DobotApiDashboard.ResetRobot() first before calling the movement API. This way, we can see the dobot move.

my questions:

  • is there any way to work around this issue?
  • is there any python API we can use to detect when the hand-teach button is pressed? I have tried RobotMode() but the mode is still the same before and after the hand-teach button is pressed (i.e. mode number 5).