从robolink导入* # API与RoboDK通信从RoboDK导入* #基本矩阵运算RDK = robolink () RDK. setcollisionactive (COLLISION_ON) RDK. setsimulationspeed (1) robot = RDK。项目(“ITEM_TYPE_ROBOT)如果不是robot.Valid():提高异常(“机器人无效或不可用”)robot.MoveJ (robot.JointsHome())θ=π/ 2 x = 70.7 + 200 y_range = [70.7, -70.7] z = 0 phi_range =(π/ 2 +π/ 4π+π/ 4]我的范围(0,10):我的范围(0,2):为y,φ在zip (y_range phi_range):构成= transl (x, y, z) * rotx(π-θ)* roty(φ-π/ 2)* rotz关节(0)= robot.SolveIK(姿势)robot.MoveJ(关节)robot.MoveJ (robot.JointsHome ())