I am facing problems with the “EnableRobot()” command when sending additional command parameters via TCP-IP
I am using the TCP-IP-4Axis-Python library from your github repository to control the MG-400:
with the latest firmware 1.5.6.0
The center of mass of our added object is off the rotation axis, which is why I set eccentric distance x in Dobot Studio to 30 mm. Then, the robot works fine. Otherwise the robot starts to shake strongly when I make a move or rotation.
Now, I would like to do the same via the TCP-IP. I found that “EnableRobot()” accepts 4 more parameters being mass, eccentric distance x, eccentric distance y, eccentric distance z.
The current version of the python API does not support further parameters which is why I changed/overwrote “EnableRobot()” to accept these 4 parameters, e.g. “EnableRobot(m,x,y,z)” where m is the mass in kg and x,y,z are distances in mm.
Interestingly, the Dobot Studio only allows to set mass, eccentric distance x, and eccentric distance y while the TCP-IP also supports eccentric distance z.
The problem is that the “EnableRobot()” command fails when I send further parameters. The alarm starts and I get error code 105 (“Robot Servo on failed”). The problem does not happen if I use “EnableRobot()” without any parameters. Once the error happens, the robot is in an unsafe state. For example, if I enable the robot via Dobot Studio after clearing the error, the robot arm makes sometimes a sudden move downwards.
If I use “EnableRobot()” without any additional parameters, everything works fine except that I cannot add the object that is off the rotation axis.
Could you please tell me how to set the eccentric distance x correctly using the python API for TCP-IP or how to use the “EnableRobot()” command? Thanks in advance.