#这个宏将保存一个时间戳和机器人关节每50毫秒从robolink导入* # API与RoboDK从RoboDK导入* #基本矩阵操作RDK = robolink () robot = RDK. item (",ITEM_TYPE_ROBOT)如果不是robot. valid (): raise Exception(" robot is not available") file_path = RDK. getparam ('PATH_OPENSTATION') + '/关节.txt' fid = open(file_path,'w') tic() while True:time = toc() print('当前时间(s):' + str(time)) joint = str(robot. joint ().tolist()) fid.write(str(time) + ', ' +关节[1:-1]+ '\n') pause(0.05) fid.close()