Check for interference via radial sweep using python scripts.- Printable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: Check for interference via radial sweep using python scripts. (/Thread-Check-for-interference-via-radial-sweep-using-python-scripts) |
Check for interference via radial sweep using python scripts.-Hems-09-02-2018 Dear All, I using the following python codes so as to get the variable radial sweep data along with the Denavit Hartenberg values.The main reason behind this is to check for interference during action.The following program is not producing the variable hexagaonal path. Could any one correct the following codes.Please refer haxagonal path in weld test for KUKA KR6 R900.Thank you. #################################################### from robolink import * # API to communicate with RoboDK from robodk import * # robodk robotics toolbox import time # Any interaction with RoboDK must be done through RDK: RDK = Robolink() # get the robot by name: robot = RDK.Item('', ITEM_TYPE_ROBOT) # get the home target and the welding targets: home = RDK.Item('Home') target = RDK.Item('Target 1') # get the pose of the target (4x4 matrix representing position and orientation): poseref = target.Pose() # move the robot to home, then to the Target 1: robot.MoveJ(home) robot.MoveJ(target) # make an hexagon around the Target 1: for i in range(7): ang = i*2*pi/6 #angle: 0, 60, 120, ... for x in range(200,210,1): #posei = poseref*rotz(ang)*transl(225,0,0)*rotz(-ang) posei = poseref*rotz(ang)*transl(x,0,0)*rotz(-ang) robot.MoveL(posei) print posei time.sleep(.025) # move back to the center, then home: robot.MoveL(target) robot.MoveJ(home) ##################################################### With Regards Hems RE: Check for interference via radial sweep using python scripts.-Albert-09-11-2018 You can change your second loop so that it goes through the following points (in order): [200,210,200] I also changed the pause by calling: robot.Pause(0.025) 这是很重要的,如果你想看到暂停时n you generate the program when you generate the program offline or you run the program on the robot using the driver. You can also use robot.setSpeed(speed) if you need to change the speed. More information and examples here: //www.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Robolink.AddProgram //www.sinclairbody.com/doc/en/PythonAPI/examples.html#offline-programming-with-gui See the attached code and project. from robolink import * # API to communicate with RoboDK from robodk import * # robodk robotics toolbox # Any interaction with RoboDK must be done through RDK: RDK = Robolink() # get the robot by name: robot = RDK.Item('', ITEM_TYPE_ROBOT) # get the home target and the welding targets: home = RDK.Item('Home') target = RDK.Item('Target 1') # get the pose of the target (4x4 matrix representing position and orientation): poseref = target.Pose() # move the robot to home, then to the Target 1: robot.MoveJ(home) robot.MoveJ(target) # make an hexagon around the Target 1: for i in range(7): ang = i*2*pi/6 #angle: 0, 60, 120, ... for x in [200,210,200]: #posei = poseref*rotz(ang)*transl(225,0,0)*rotz(-ang) posei = poseref*rotz(ang)*transl(x,0,0)*rotz(-ang) robot.MoveL(posei) print(posei) robot.Pause(.025) # move back to the center, then home: robot.MoveL(target) robot.MoveJ(home) RE: Check for interference via radial sweep using python scripts.-Hems-01-08-2019 Dear Administrator, Thank you for the previous reply.In continuation with the previous E mail communication, I request you refer the attachment in this thread so to generate variable hexagonal path that extends into two different planes that are co-axial about the axis A-A'. Please consider the side length of 5,internal offset of 3 and vertical offset of 10.Please run this on KUKA KR6 R900 weld test.Thank you. With Best Regards/ Mit Besten Grüßen / Sincères Salutations Hemanth Gaekwad ![]() RE: Check for interference via radial sweep using python scripts.-Hems-09-27-2019 Dear All, In continuation with KUKA KR6 R900 weld test model,how do you suppress the negative sign for zero values for displacement as well as for the cosine angles in the Denavit Hartenberg Matrix? Does the negative sign for zero hold any significance in Denavit Hartenberg Matrix? Could anyone answer my question? Please refer the attached model and DH_Values for the reference.Thank you. With Best Regards/ Mit Besten Grüßen / Sincères Salutations Hemanth Gaekwad |