Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Check for interference via radial sweep using python scripts.

#1
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
#2
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)
This is important if you want to see the pause when 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:
https://robodk.com/doc/en/PythonAPI/robo...AddProgram
https://robodk.com/doc/en/PythonAPI/exam...g-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)


Attached Files
.rdk   KUKA-Robot-Welding-Radial-Sweep.rdk (Size: 335.37 KB / Downloads: 675)
#3
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



.pdf   HexagonalPath.pdf (Size: 115.19 KB / Downloads: 580)
#4
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


Attached Files
.rdk   KUKA-Robot-Welding-Radial-Sweep.rdk (Size: 335.37 KB / Downloads: 484)
.pdf   DH_Values.pdf (Size: 7.22 KB / Downloads: 545)
  




Users browsing this thread:
1 Guest(s)