graduation-design/robot_control/control.py
GitLab 559a94c55a 1.大体实现机械臂跟随物体移动
2.使用线程队列将机器人控制与视觉识别解耦,大大提高了系统的流畅性
2024-04-01 13:59:33 +08:00

18 lines
400 B
Python

import queue
import threading
import Robot
import time
robotCTL = Robot.RPC('192.168.3.102')
tool = 1 # 工具坐标系编号
user = 1 # 工件坐标系编号
speed_error_code = robotCTL.SetSpeed(40)
if speed_error_code != 0:
print("初始化全局速度错误:", speed_error_code)
robotCTL.StartJOG(ref=4, nb=1, dir=1, max_dis=100, vel=20.0, acc=100.0)
time.sleep(1)
robotCTL.ImmStopJOG()