09-20-2021, 02:02 AM
(This post was last modified: 09-20-2021, 02:13 AM bylllorenzo3.)
Hey guys can someone please help. We are having a problem connecting our driver to the robot arm which we will be using a arduino and custom motors.
The connection error picture is attached below. The error we get is Error: Process failed to start. The system cannot find the file specified. (id 0 )
We worked off of this guys code .https://github.com/egehandulger/robodkdriver
Here is the code.
I could send over the actual .pyc code .
from robodkdriver import RoboDK, RobotSerial
class MyMultiAxisRobot(RobotSerial):
def run_command(self, cmd: str, args: tuple):
RoboDK.update_status('working')
if cmd == 'CONNECT':
connected = self._connect(port=(args[0]), baud_rate=(int(args[1])))
if not connected:
return 'connection_problems'
return 'ready'
if cmd == 'DISCONNECT' or cmd == 'STOP':
disconnected = self._disconnect()
if disconnected:
return 'disconnected'
return 'ready'
if cmd == 'MOVJ':
self._send_message('{cmd} {angles}'.format(cmd=cmd, angle=(' '.join(args))))
if self._get_message('DONE'):
return 'ready'
return 'error'
if cmd == 'CJNT':
self._send_message(cmd)
关节= self._get_message ()
RoboDK.update_status(joints)
return 'ready'
def RunMain():
RoboDK(MyMultiAxisRobot()).run_driver()
if __name__ == '__main__':
RunMain()
The connection error picture is attached below. The error we get is Error: Process failed to start. The system cannot find the file specified. (id 0 )
We worked off of this guys code .https://github.com/egehandulger/robodkdriver
Here is the code.
I could send over the actual .pyc code .
from robodkdriver import RoboDK, RobotSerial
class MyMultiAxisRobot(RobotSerial):
def run_command(self, cmd: str, args: tuple):
RoboDK.update_status('working')
if cmd == 'CONNECT':
connected = self._connect(port=(args[0]), baud_rate=(int(args[1])))
if not connected:
return 'connection_problems'
return 'ready'
if cmd == 'DISCONNECT' or cmd == 'STOP':
disconnected = self._disconnect()
if disconnected:
return 'disconnected'
return 'ready'
if cmd == 'MOVJ':
self._send_message('{cmd} {angles}'.format(cmd=cmd, angle=(' '.join(args))))
if self._get_message('DONE'):
return 'ready'
return 'error'
if cmd == 'CJNT':
self._send_message(cmd)
关节= self._get_message ()
RoboDK.update_status(joints)
return 'ready'
def RunMain():
RoboDK(MyMultiAxisRobot()).run_driver()
if __name__ == '__main__':
RunMain()