robot setspeed is not working- 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: robot setspeed is not working (/Thread-robot-setspeed-is-not-working) |
robot setspeed is not working-Nox-10-01-2018 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:
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]
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 :) RE: robot setspeed is not working-Albert-10-04-2018 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 RE: robot setspeed is not working-Nox-10-22-2018 Sorry for not answering this, I own a KUKA KR-210 l150, does this works with percentages as speed? (from 0 to 100?) |