47 from robolink
import *
51 PROGRAM_PJX =
'''<?xml version="1.0" encoding="utf-8"?> 52 <Project xmlns="http://www.staubli.com/robotics/VAL3/Project/3"> 53 <Parameters version="s7.5.3" stackSize="5000" millimeterUnit="true" /> 55 <Program file="MoveJoint.pgx" /> 56 <Program file="MoveLine.pgx" /> 57 <Program file="start.pgx" /> 58 <Program file="stop.pgx" /> 59 <Program file="main.pgx" /> 62 <Data file="%s.dtx" /> 68 PROGRAM_DTX =
'''<?xml version="1.0" encoding="utf-8"?> 69 <Database xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.staubli.com/robotics/VAL3/Data/2"> 71 <Data name="mNomSpeed" access="private" xsi:type="array" type="mdesc" size="1" /> 72 <Data name="fFrame1" access="private" xsi:type="array" type="frame" size="1"> 73 <Value key="0" %s fatherId="world[0]" /> 75 <Data name="Input" access="private" xsi:type="array" type="dio" size="16"> 76 <Value key="0" link="BasicIO-2\\%%I0" /> 77 <Value key="1" link="BasicIO-2\\%%I1" /> 78 <Value key="2" link="BasicIO-2\\%%I2" /> 79 <Value key="3" link="BasicIO-2\\%%I3" /> 80 <Value key="4" link="BasicIO-2\\%%I4" /> 81 <Value key="5" link="BasicIO-2\\%%I5" /> 82 <Value key="6" link="BasicIO-2\\%%I6" /> 83 <Value key="7" link="BasicIO-2\\%%I7" /> 84 <Value key="8" link="BasicIO-2\\%%I8" /> 85 <Value key="9" link="BasicIO-2\\%%I9" /> 86 <Value key="10" link="BasicIO-2\\%%I10" /> 87 <Value key="11" link="BasicIO-2\\%%I11" /> 88 <Value key="12" link="BasicIO-2\\%%I12" /> 89 <Value key="13" link="BasicIO-2\\%%I13" /> 90 <Value key="14" link="BasicIO-2\\%%I14" /> 91 <Value key="15" link="BasicIO-2\\%%I15" /> 93 <Data name="Output" access="private" xsi:type="array" type="dio" size="16"> 94 <Value key="0" link="BasicIO-2\\%%Q0" /> 95 <Value key="1" link="BasicIO-2\\%%Q1" /> 96 <Value key="2" link="BasicIO-2\\%%Q2" /> 97 <Value key="3" link="BasicIO-2\\%%Q3" /> 98 <Value key="4" link="BasicIO-2\\%%Q4" /> 99 <Value key="5" link="BasicIO-2\\%%Q5" /> 100 <Value key="6" link="BasicIO-2\\%%Q6" /> 101 <Value key="7" link="BasicIO-2\\%%Q7" /> 102 <Value key="8" link="BasicIO-2\\%%Q8" /> 103 <Value key="9" link="BasicIO-2\\%%Q9" /> 104 <Value key="10" link="BasicIO-2\\%%Q10" /> 105 <Value key="11" link="BasicIO-2\\%%Q11" /> 106 <Value key="12" link="BasicIO-2\\%%Q12" /> 107 <Value key="13" link="BasicIO-2\\%%Q13" /> 108 <Value key="14" link="BasicIO-2\\%%Q14" /> 109 <Value key="15" link="BasicIO-2\\%%Q15" /> 111 <Data name="tCurrentTool" access="private" xsi:type="array" type="tool" size="1"> 112 <Value key="0" %s fatherId="flange[0]" ioLink="valve1" /> 114 <Data name="mCurrentSpeed" access="private" xsi:type="array" type="mdesc" size="1" /> 115 <Data name="pPointRx" access="private" xsi:type="array" type="pointRx" size="1"> 116 <Value key="0" fatherId="fFrame1[0]" /> 122 MOVELINE_PGX =
'''<?xml version="1.0" encoding="utf-8"?> 123 <Programs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.staubli.com/robotics/VAL3/Program/2"> 124 <Program name="MoveLine"> 125 <Parameters xmlns="http://www.staubli.com/robotics/VAL3/Param/1"> 126 <Parameter name="x_nX" type="num" xsi:type="element" /> 127 <Parameter name="x_nY" type="num" xsi:type="element" /> 128 <Parameter name="x_nZ" type="num" xsi:type="element" /> 129 <Parameter name="x_nRx" type="num" xsi:type="element" /> 130 <Parameter name="x_nRy" type="num" xsi:type="element" /> 131 <Parameter name="x_nRz" type="num" xsi:type="element" /> 134 pPointRx.trsf.x = x_nX 135 pPointRx.trsf.y = x_nY 136 pPointRx.trsf.z = x_nZ 137 pPointRx.trsf.rx = x_nRx 138 pPointRx.trsf.ry = x_nRy 139 pPointRx.trsf.rz = x_nRz 140 movel(pPointRx,tCurrentTool,mCurrentSpeed) 146 MOVEJOINT_PGX =
'''<?xml version="1.0" encoding="utf-8"?> 147 <Programs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.staubli.com/robotics/VAL3/Program/2"> 148 <Program name="MoveJoint"> 149 <Parameters xmlns="http://www.staubli.com/robotics/VAL3/Param/1"> 150 <Parameter name="x_nJ1" type="num" xsi:type="element" /> 151 <Parameter name="x_nJ2" type="num" xsi:type="element" /> 152 <Parameter name="x_nJ3" type="num" xsi:type="element" /> 153 <Parameter name="x_nJ4" type="num" xsi:type="element" /> 154 <Parameter name="x_nJ5" type="num" xsi:type="element" /> 155 <Parameter name="x_nJ6" type="num" xsi:type="element" /> 158 <Local name="l_jJoint" type="joint" xsi:type="array" size="1" /> 167 movej(l_jJoint,tCurrentTool ,mCurrentSpeed) 173 MAIN_PGX =
'''<?xml version="1.0" encoding="utf-8"?> 174 <Programs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.staubli.com/robotics/VAL3/Program/2"> 175 <Program name="main"> 178 pPointRx.config.shoulder = lefty 179 pPointRx.config.elbow = epositive 180 pPointRx.config.wrist = wpositive 181 mCurrentSpeed.tvel = 100.00 182 mCurrentSpeed.blend = joint 183 mCurrentSpeed.reach = 0.010 184 mCurrentSpeed.leave = 0.010 192 START_PGX =
'''<?xml version="1.0" encoding="utf-8"?> 193 <Programs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.staubli.com/robotics/VAL3/Program/2"> 194 <Program name="start"> 202 STOP_PGX =
'''<?xml version="1.0" encoding="utf-8"?> 203 <Programs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.staubli.com/robotics/VAL3/Program/2"> 204 <Program name="stop"> 213 LOAD_NEXT_ONE =
'''<?xml version="1.0" encoding="utf-8" ?> 214 <Programs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.staubli.com/robotics/VAL3/Program/2"> 215 <Program name="loadNextOne" access="private"> 216 <Parameters xmlns="http://www.staubli.com/robotics/VAL3/Param/1"> 217 <Parameter name="x_sName" type="string" xsi:type="element" /> 221 prog_swap:libLoad(x_sName) 227 START_PGX_MAIN =
'''<?xml version="1.0" encoding="utf-8" ?> 228 <Programs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.staubli.com/robotics/VAL3/Program/2"> 229 <Program name="start" access="public"> 239 PROGRAM_PJX_MAIN =
'''<?xml version="1.0" encoding="utf-8" ?> 240 <Project xmlns="http://www.staubli.com/robotics/VAL3/Project/3"> 241 <Parameters version="s7.3.1" stackSize="5000" millimeterUnit="true" /> 243 <Program file="loadNextOne.pgx" /> 244 <Program file="start.pgx" /> 245 <Program file="stop.pgx" /> 248 <Data file="%s.dtx" /> 251 <Library alias="prog" path="./%s.pjx" /> 252 <Library alias="prog_swap" path="./%s.pjx" /> 253 <Library alias="tooldata" path="saveChangeTool" /> 259 """Converts a pose to a Staubli target target""" 268 if c > (1.0 - 1e-10):
271 rz1 =
atan2(H[1,0],H[1,1])
272 elif c < (-1.0 + 1e-10):
275 rz1 =
atan2(H[1,0],H[1,1])
286 return [x, y, z, rx1*180.0/pi, ry1*180.0/pi, rz1*180.0/pi]
290 """Prints a pose target""" 292 return (
'%.3f,%.3f,%.3f,%.3f,%.3f,%.3f' % (x,y,z,r,p,w))
295 """Prints a joint target for Staubli VAL3 XML""" 297 for i
in range(len(angles)):
298 str = str + (
'%.5f,' % (angles[i]))
303 """Prints a pose target""" 305 return (
'x="%.3f" y="%.3f" z="%.3f" rx="%.3f" ry="%.3f" rz="%.3f"' % (x,y,z,r,p,w))
309 from tkinter
import filedialog
311 options[
'initialdir'] = strdir
312 options[
'title'] = strtitle
315 file_path = tkinter.filedialog.askdirectory(**options)
321 """Robot post object""" 326 PROG_NAME =
'unknown' 327 MAIN_FOLDER =
'ProgRoboDK' 330 PROG_MOVE_COUNT_MAX = 200
346 def __init__(self, robotpost=None, robotname=None, robot_axes = 6, **kwargs):
355 self.
addline(
'// Program %s start' % progname)
360 self.
addline(
'// Program %s end' % progname)
364 """Recursively delete a directory tree on a remote server.""" 367 names = ftp.nlst(path)
368 except ftplib.all_errors
as e:
370 print(
'RemoveDirFTP: Could not remove {0}: {1}'.format(path, e))
374 if os.path.split(name)[1]
in (
'.',
'..'):
continue 375 print(
'RemoveDirFTP: Checking {0}'.format(name))
380 except ftplib.all_errors:
385 except ftplib.all_errors
as e:
386 print(
'RemoveDirFTP: Could not remove {0}: {1}'.format(path, e))
394 robot = RDK.Item(self.
ROBOT_NAME, ITEM_TYPE_ROBOT)
395 [server_ip, port, remote_path, username, password] = robot.ConnectionParams()
397 server_ip =
'localhost' 398 username =
'username' 399 password =
'password' 400 remote_path =
'/usr/usrapp/session/default/saveTraj/CAD' 403 print(
"POPUP: Uploading program through FTP. Enter server parameters...")
407 values_ok =
mbox(
'Using the following FTP connection parameters to transfer the program:\nRobot IP: %s\nRemote path: %s\nFTP username: %s\nFTP password: ****\n\nContinue?' % (server_ip, remote_path, username))
409 print(
"Using default connection parameters")
411 server_ip =
mbox(
'Enter robot IP', entry=server_ip)
413 print(
'FTP upload cancelled by user')
415 remote_path =
mbox(
'Enter the remote path (program folder) on the Staubli robot controller', entry=remote_path)
418 if remote_path.endswith(
'/'):
419 remote_path = remote_path[:-1]
420 rob_user_pass =
mbox(
'Enter user name and password as\nuser-password', entry=(
'%s-%s' % (username, password)))
421 if not rob_user_pass:
423 name_value = rob_user_pass.split(
'-')
424 if len(name_value) < 2:
427 password = name_value[1]
428 username = name_value[0]
429 print(
"POPUP: <p>Connecting to <strong>%s</strong> using user name <strong>%s</strong> and password ****</p><p>Please wait...</p>" % (server_ip, username))
432 if robot
is not None:
433 robot.setConnectionParams(server_ip, port, remote_path, username, password)
436 myFTP = ftplib.FTP(server_ip, username, password)
439 error_str = sys.exc_info()[1]
440 print(
"POPUP: Connection to %s failed: <p>%s</p>" % (server_ip,error_str))
442 contin =
mbox(
"Connection to %s failed. Reason:\n%s\n\nRetry?" % (server_ip,error_str))
446 remote_path_prog = remote_path +
'/' + self.
MAIN_FOLDER 447 myPath =
r'%s' % localpath
448 print(
"POPUP: Connected. Deleting existing files on %s..." % remote_path_prog)
451 print(
"POPUP: Connected. Uploading program to %s..." % server_ip)
454 myFTP.cwd(remote_path)
456 myFTP.cwd(remote_path_prog)
459 error_str = sys.exc_info()[1]
460 print(
"POPUP: Remote path not found or can't be created: %s" % (remote_path))
462 contin =
mbox(
"Remote path\n%s\nnot found or can't create folder.\n\nChange path and permissions and retry." % remote_path)
465 def uploadThis(path):
466 files = os.listdir(path)
469 if os.path.isfile(path +
r'\{}'.format(f)):
470 print(
' Sending file: %s' % f)
471 print(
"POPUP: Sending file: %s" % f)
474 myFTP.storbinary(
'STOR %s' % f, fh)
476 elif os.path.isdir(path +
r'\{}'.format(f)):
477 print(
' Sending folder: %s' % f)
480 uploadThis(path +
r'\{}'.format(f))
485 def ProgSave(self, folder, progname, ask_user = False, show_result = False):
490 if foldersave
is not None and len(foldersave) > 0:
491 foldersave = foldersave
498 print(
"Saving %i programs..." % nprogs)
500 main_progname =
'Main' + progname
502 folderprog = foldersave +
'/' + main_progname
505 folderprog = foldersave +
'/' + progname
510 os.makedirs(folderprog)
515 for i
in range(nprogs):
516 call_sequence+=(
' if prog:libLoad("./%s")!=0\n' % self.
PROG_NAME_LIST[i])
517 call_sequence+=(
' logMsg("Error Loading RoboDK library")\n')
518 call_sequence+=(
' popUpMsg("Error Loading RoboDK library")\n')
519 call_sequence+=(
' endIf\n')
520 call_sequence+=(
' wait(taskStatus("loading")==-1)\n')
522 call_sequence+=(
' taskCreate "loading",10,loadNextOne("./%s")\n' % self.
PROG_NAME_LIST[i+1])
525 call_sequence+=(
' call prog:start()\n')
526 call_sequence+=(
' \n')
530 start_file = folderprog +
'/start.pgx' 531 show_file_list.append(start_file)
532 fid = open(start_file,
"w")
533 fid.write(START_PGX_MAIN % call_sequence)
537 project_file = folderprog +
'/%s.pjx' % main_progname
539 fid = open(project_file,
"w")
541 fid.write(PROGRAM_PJX_MAIN % (main_progname, dummy_folder, dummy_folder))
543 print(
'SAVED: %s\n' % project_file)
546 program_data = folderprog +
'/%s.dtx' % main_progname
547 show_file_list.append(project_file)
548 fid = open(program_data,
"w")
553 stop_file = folderprog +
'/stop.pgx' 554 fid = open(stop_file,
"w")
559 program_data = folderprog +
'/loadNextOne.pgx' 560 fid = open(program_data,
"w")
561 fid.write(LOAD_NEXT_ONE)
565 for i
in range(nprogs):
569 folderprog_final = folderprog
573 os.makedirs(folderprog_final)
577 start_file = folderprog_final +
'/start.pgx' 579 fid = open(start_file,
"w")
584 stop_file = folderprog_final +
'/stop.pgx' 585 fid = open(stop_file,
"w")
590 movej_file = folderprog_final +
'/MoveJoint.pgx' 592 fid = open(movej_file,
"w")
593 fid.write(MOVEJOINT_PGX)
597 movel_file = folderprog_final +
'/MoveLine.pgx' 598 fid = open(movel_file,
"w")
599 fid.write(MOVELINE_PGX)
603 project_file = folderprog_final +
'/%s.pjx' % self.
PROG_NAME 605 fid = open(project_file,
"w")
608 print(
'SAVED: %s\n' % project_file)
611 program_data = folderprog_final +
'/%s.dtx' % self.
PROG_NAME 612 show_file_list.append(program_data)
613 fid = open(program_data,
"w")
618 main_data = folderprog_final +
'/main.pgx' 619 show_file_list.append(main_data)
620 fid = open(main_data,
"w")
629 if type(show_result)
is str:
632 for file_i
in show_file_list:
633 p = subprocess.Popen([show_result, file_i])
636 elif type(show_result)
is list:
638 p = subprocess.Popen(show_result + [filesave])
642 os.startfile(start_file)
643 os.startfile(program_data)
644 if len(self.
LOG) > 0:
645 mbox(
'Program generation LOG:\n\n' + self.
LOG)
649 """Send a program to the robot using the provided parameters. This method is executed right after ProgSave if we selected the option "Send Program to Robot". 650 The connection parameters must be provided in the robot connection menu of RoboDK""" 653 def MoveJ(self, pose, joints, conf_RLF=None):
654 """Add a joint movement""" 658 def MoveL(self, pose, joints, conf_RLF=None):
659 """Add a linear movement""" 661 raise Exception(
"Linear move must be a Cartesian target for VAL3")
669 [rear, lowerarm, flip] = conf_RLF
672 self.
addline(
'pPointRx.config.shoulder = %s' % (
"righty" if rear>0
else "lefty"))
675 self.
addline(
'pPointRx.config.elbow = %s' % (
"enegative" if lowerarm>0
else "epositive"))
678 self.
addline(
'pPointRx.config.wrist = %s' % (
"wnegative" if flip>0
else "wpositive"))
683 def MoveC(self, pose1, joints1, pose2, joints2, conf_RLF_1=None, conf_RLF_2=None):
684 """Add a circular movement""" 686 raise Exception(
"Circular moves not supported for this post processor")
688 def setFrame(self, pose, frame_id=None, frame_name=None):
689 """Change the robot reference frame""" 691 self.
RunMessage(
'Warning: This post processor is meant to use one reference frame. Errors might follow.',
True)
692 self.log(
'This post processor is meant to use one reference frame. Errors might follow.')
698 def setTool(self, pose, tool_id=None, tool_name=None):
699 """Change the robot TCP""" 701 self.
RunMessage(
'Warning: Only one tool allowed per program. Tool change skipped.',
True)
702 self.log(
'Only one tool allowed per program')
710 """Pause the robot program""" 713 self.
addline(
'popUpMsg("Paused. Press OK to continue")')
715 self.
addline(
'delay(%.3f)' % (time_ms*0.001))
718 """Changes the robot speed (in mm/s)""" 719 if self.
SPEED != speed_mms:
721 self.
addline(
'mCurrentSpeed.tvel = %.3f' % speed_mms)
724 """Changes the robot acceleration (in mm/s2)""" 728 """Changes the robot joint speed (in deg/s)""" 732 """Changes the robot joint acceleration (in deg/s2)""" 736 """Changes the zone data approach (makes the movement more smooth)""" 737 self.
addline(
'mCurrentSpeed.reach = %.3f' % zone_mm)
738 self.
addline(
'mCurrentSpeed.leave = %.3f' % zone_mm)
741 """Sets a variable (output) to a given value""" 742 if type(io_var) != str:
743 io_var =
'OUT[%s]' % str(io_var)
744 if type(io_value) != str:
751 self.
addline(
'%s=%s' % (io_var, io_value))
753 def waitDI(self, io_var, io_value, timeout_ms=-1):
754 """Waits for an input io_var to attain a given value io_value. Optionally, a timeout can be provided.""" 755 if type(io_var) != str:
756 io_var =
'IN[%s]' % str(io_var)
757 if type(io_value) != str:
765 self.
addline(
'WAIT FOR %s==%s' % (io_var, io_value))
767 self.
addline(
'WAIT FOR %s==%s TIMEOUT=%.1f' % (io_var, io_value, timeout_ms))
769 def RunCode(self, code, is_function_call = False):
770 """Adds code or a function call""" 773 code.replace(
' ',
'_')
774 if not code.endswith(
')'):
778 self.
addline(
'//call prog:%s' % code)
783 """Display a message in the robot controller screen (teach pendant)""" 788 self.
addline(
'popUpMsg("%s")' % message)
792 """Add a program line""" 796 """Add a log message""" 797 self.
LOG = self.
LOG + newline +
'\n' 811 progname = progname + (
'%i' % (nprogs+1))
826 [x,y,z,r,p,w] = xyzrpw
836 return Mat([[cb*ca, ca*sc*sb - cc*sa, sc*sa + cc*ca*sb, x],[cb*sa, cc*ca + sc*sb*sa, cc*sb*sa - ca*sc, y],[-sb, cb*sc, cc*cb, z],[0,0,0,1]])
839 """Test the post with a basic program""" 843 robot.ProgStart(
"Program")
844 robot.RunMessage(
"Program generated by RoboDK using a custom post processor",
True)
845 robot.setFrame(
Pose([807.766544, -963.699898, 41.478944, 0, 0, 0]))
846 robot.setTool(
Pose([62.5, -108.253175, 100, -60, 90, 0]))
847 robot.MoveJ(
Pose([200, 200, 500, 180, 0, 180]), [-46.18419, -6.77518, -20.54925, 71.38674, 49.58727, -302.54752] )
848 robot.MoveL(
Pose([200, 250, 348.734575, 180, 0, -150]), [-41.62707, -8.89064, -30.01809, 60.62329, 49.66749, -258.98418] )
849 robot.MoveL(
Pose([200, 200, 262.132034, 180, 0, -150]), [-43.73892, -3.91728, -35.77935, 58.57566, 54.11615, -253.81122] )
850 robot.RunMessage(
"Setting air valve 1 on")
851 robot.RunCode(
"TCP_On",
True)
853 robot.MoveL(
Pose([200, 250, 348.734575, 180, 0, -150]), [-41.62707, -8.89064, -30.01809, 60.62329, 49.66749, -258.98418] )
854 robot.MoveL(
Pose([250, 300, 278.023897, 180, 0, -150]), [-37.52588, -6.32628, -34.59693, 53.52525, 49.24426, -251.44677] )
855 robot.MoveL(
Pose([250, 250, 191.421356, 180, 0, -150]), [-39.75778, -1.04537, -40.37883, 52.09118, 54.15317, -246.94403] )
856 robot.RunMessage(
"Setting air valve off")
857 robot.RunCode(
"TCP_Off",
True)
859 robot.MoveL(
Pose([250, 300, 278.023897, 180, 0, -150]), [-37.52588, -6.32628, -34.59693, 53.52525, 49.24426, -251.44677] )
860 robot.MoveL(
Pose([250, 200, 278.023897, 180, 0, -150]), [-41.85389, -1.95619, -34.89154, 57.43912, 52.34162, -253.73403] )
861 robot.MoveL(
Pose([250, 150, 191.421356, 180, 0, -150]), [-43.82111, 3.29703, -40.29493, 56.02402, 56.61169, -249.23532] )
862 robot.ProgFinish(
"Program")
864 print(robot.PROG_PGX)
865 if len(robot.LOG) > 0:
866 mbox(
'Program generation LOG:\n\n' + robot.LOG)
868 input(
"Press Enter to close...")
870 if __name__ ==
"__main__":
871 """Function to call when the module is executed by itself: test""" def RunMessage(self, message, iscomment=False)
def addline(self, newline)
def setDO(self, io_var, io_value)
def setZoneData(self, zone_mm)
def waitDI(self, io_var, io_value, timeout_ms=-1)
def ProgStart(self, progname)
def setAccelerationJoints(self, accel_degss)
def control_ProgSize(self)
def __init__(self, robotpost=None, robotname=None, robot_axes=6, kwargs)
def RunCode(self, code, is_function_call=False)
def setFrame(self, pose, frame_id=None, frame_name=None)
def MoveJ(self, pose, joints, conf_RLF=None)
def setTool(self, pose, tool_id=None, tool_name=None)
def addlog(self, newline)
def mbox(msg, b1='OK', b2='Cancel', frame=True, t=False, entry=None)
def getSaveFolder(strdir='C:\\', strtitle='Save program folder ...')
def setSpeed(self, speed_mms)
def UploadFTP(self, localpath)
def RemoveDirFTP(self, ftp, path)
def setAcceleration(self, accel_mmss)
def MoveL(self, pose, joints, conf_RLF=None)
def setSpeedJoints(self, speed_degs)
def ProgFinish(self, progname)
def MoveC(self, pose1, joints1, pose2, joints2, conf_RLF_1=None, conf_RLF_2=None)
def ProgSave(self, folder, progname, ask_user=False, show_result=False)
def ProgSendRobot(self, robot_ip, remote_path, ftp_user, ftp_pass)