03-06-2023, 10:52 PM
Hello,
Problem:
I am using the UR10 robot with a curve following project and trying to get rid of the stop and go between waypoints by using rounding. When I set a rounding instruction in the program and "Generate robot program", the blend radius value shows up in the script file but is not populated as an argument in the movep command. I am currently using the "Universal Robots MoveP" post processor.
How do I get the blend radius to be taken as an argument by movep when I "Generate robot program"?I know the blending works because I uploaded the script onto the UR pendant and manually added the blend to each movep command in the script, which produces the desired behavior from the real robot.
Things I have tried:
Script file generated when I click "Generate robot program":
Area of code with problem. As you can see the correct blend_radius_m variable is initialized per my program but it is not populated in the movep arguments (underlined in red)
Problem:
I am using the UR10 robot with a curve following project and trying to get rid of the stop and go between waypoints by using rounding. When I set a rounding instruction in the program and "Generate robot program", the blend radius value shows up in the script file but is not populated as an argument in the movep command. I am currently using the "Universal Robots MoveP" post processor.
How do I get the blend radius to be taken as an argument by movep when I "Generate robot program"?I know the blending works because I uploaded the script onto the UR pendant and manually added the blend to each movep command in the script, which produces the desired behavior from the real robot.
Things I have tried:
- Updating robodk
- Using different post processors, such as "Universal Robots", "Universal Robots URP", and the one linkedhere. I ended up using the "Universal Robots MoveP" since that's what I think I need to properly add in the blend radius.
- Modifying the UR post processor according to this commenthereand thewiki
- I believe there is a minimum distance between two points for the post processor to output a blend radius in the script file, not sure exactly what it is for UR. I think I have sufficient distance between my points (atleast 30mm). I've tried changing the rounding values in robodk from 1mm to 5mm but this still does not populate the blend radius argument in the movep command in the script file.
Script file generated when I click "Generate robot program":
Code:
def pick2():
# Global parameters:
global speed_ms = 0.250
global speed_rads = 0.750
global accel_mss = 1.200
global accel_radss = 1.200
global blend_radius_m = 0.001
global ref_frame = p[0,0,0,0,0,0]
#--------------------------
# Add any default subprograms here
# For example, to drive a gripper as a program call:
# def Gripper_Open():
# ...
# end
#
# Example to drive a spray gun:
def SprayOn(value):
# use the value as an output:
DO_SPRAY = 5
if value == 0:
set_standard_digital_out(DO_SPRAY, False)
else:
set_standard_digital_out(DO_SPRAY, True)
end
end
# Example to drive an extruder:
def Extruder(value):
# use the value as an output:
if value < 0:
# stop extruder
else:
# start extruder
end
end
# Example to move an external axis
def MoveAxis(value):
# use the value as an output:
DO_AXIS_1 = 1
DI_AXIS_1 = 1
if value <= 0:
set_standard_digital_out(DO_AXIS_1, False)
#等待数字输入改变状态
#while (get_standard_digital_in(DI_AXIS_1) != False):
# sync()
#end
else:
set_standard_digital_out(DO_AXIS_1, True)
#等待数字输入改变状态
#while (get_standard_digital_in(DI_AXIS_1) != True):
# sync()
#end
end
end
#--------------------------
# Main program:
# Program generated by RoboDK v5.4.1 for UR10e on 06/03/2023 13:45:32
# Using nominal kinematics.
blend_radius_m = 0.005
speed_ms = 0.200
ref_frame = p[-0.469960, -0.758650, -0.028850, 0.000000, 0.000000, 0.000000]
set_tcp(p[0.000000, 0.000000, 0.200000, 0.000000, 0.000000, 0.000000])
movej([-2.198609, -2.258386, -1.559731, -2.575268, -2.400037, 6.265732],accel_radss,speed_rads,0,0)
movep([-2.198609, -2.368639, -1.578502, -2.446253, -2.400037, 6.265732],accel_mss,speed_ms,0) # end trace
set_standard_digital_out(3, True)
sleep(0.500)
movep([-2.132391, -2.296487, -1.730749, -2.353734, -2.276869, 5.480334],accel_mss,speed_ms,0)
movep([-2.051512, -2.234336, -1.863052, -2.274042, -2.138953, 4.694936],accel_mss,speed_ms,0)
movep([-1.954681, -2.181906, -1.975852, -2.206655, -1.985068, 3.909538],accel_mss,speed_ms,0)
movep([-1.841846, -2.139582, -2.068023, -2.152218, -1.815160, 3.124139],accel_mss,speed_ms,0)
movep ([-1.715154, -2.108166, -2.137260, -2.112250,-1.631363, 2.338741],accel_mss,speed_ms,0)
movep([-1.579675, -2.088618, -2.180841, -2.088740, -1.438802, 1.553343],accel_mss,speed_ms,0)
movep([-1.443153, -2.081741, -2.196392, -2.083539, -1.245231, 0.767945],accel_mss,speed_ms,0)
movep([-1.335217, -2.085721, -2.187596, -2.091812, -1.137642, -0.017453],accel_mss,speed_ms,0) # end trace
speed_ms = 1.000
movep([-1.335217, -1.914836, -2.164645, -2.285631, -1.137642, -0.017453],accel_mss,speed_ms,0)
# End of main program
end
pick2()
Area of code with problem. As you can see the correct blend_radius_m variable is initialized per my program but it is not populated in the movep arguments (underlined in red)