Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
robot setspeed is not working
#1
Hello everyone,
I'm having troubles with setting the right speed to my robot, is a KUKA KR-210 l-150...
I'm using RoboDK with Python script to make different movements, and right now i can't seem to change the value of the speed...


According to the documentation found online, the setSpeed function:

Code:
setSpeed
(speed_linear,speed_joints=-1,accel_linear=-1,accel_joints=-1)[url=//www.sinclairbody.com/doc/en/PythonAPI/robolink.html?highlight=setspeed#robolink.Item.setSpeed][/url]
Sets the linear speed of a robot. Additional arguments can be provided to set linear acceleration or joint speed and acceleration.
Parameters:
  • speed_linear(float) – linear speed -> speed in mm/s (-1 = no change)
  • speed_joints(float) – joint speed (optional) -> acceleration in mm/s2 (-1 = no change)
  • accel_linear(float) – linear acceleration (optional) -> acceleration in mm/s2 (-1 = no change)
  • accel_joints(float) – joint acceleration (optional) -> acceleration in deg/s2 (-1 = no change)

So, as i'm using "MoveJ" to do the robot movements, I understand that I should use robot.setSpeed(-1, speed)
tryng speed with different values i can't seem to solve anything...

Code:
speeds=[5, 100, 200, 5, 7]

for i in range(0,5):
target = robot.Pose()
robot.setSpeed(speeds[i])
robot.MoveJ(target*transl(-100,0,0))
robot.Pause(500)

This is my code right now... maybe is something about the robot configuration? I'm running out of ideas, any help would be much appreciated, thanks in advance :)
#2
Hi Nox,

You should specify the joint speed variable for joint movements, you can do so by passing -1 as a first value, then, the joint speed or by specifying it in the following way:

speeds=[5, 100, 200, 5, 7]
target = robot.Pose()
for speed_j in joint_speeds:
# Calculate the next position
target = target*transl(-50,0,0)

# Change the robot speed:
robot.setSpeed(speed_joints = speed_j)
# Alternatively, you can do:
#robot.setSpeed(-1, speed_j)

# Move the robot
robot.MoveJ(target)

# Pause 500 ms
robot.Pause(500)

In any case, the post processor will define the behavior of what happens when you change the speed. What robot are you using? Not all robots support setting the speed in the joint space. Some robot controllers support setting the speed as a percentage so you may see your speed converted to a percentage value.

You can customize this behavior by modifying the setSpeedJoints command.

Albert
#3
Sorry for not answering this, I own a KUKA KR-210 l150, does this works with percentages as speed? (from 0 to 100?)




Users browsing this thread:
1 Guest(s)