RoboDK Forum
Decrease Robot's speed- 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: Decrease Robot's speed (/Thread-Decrease-Robot-s-speed)



Decrease Robot's speed-Civgineer-05-06-2019

Dear All,

In RoboDK API there is a fuction:
Code:
setSpeed (speed_linear, speed_joints=-1, accel_linear=-1, accel_joints=-1)

If I understood correctly, linear and joints accelerations might be only positive?
Is it possible to slowdown Robot while it approach from start to finish point?
For instance to start movement with speed 100 mm/s and close to the destination point reduce speed with this function to 5 mm/s.


RE: Decrease Robot's speed-DavidG-05-06-2019

Hi Civgineer,
if your robot is moving from point A to point B he naturally has to decelerate before reaching point B. Have a look at the attachment. When you are using setSpeed you get a ramp function for your velocity. At some point of the movement the robot will have a speed of 5mm/s. How close this point will be to your target point B depends on the acceleration/deceleration you set. Mathematically there are infinitely many ways to do that.
Maybe you can provide a little more details what you are trying to do. I am not sure if you want to meet a specific speed at a specific distance from a certain point or you if you only want to run past a certain point with slower speed without stopping.


RE: Decrease Robot's speed-Civgineer-05-06-2019

Hello DavidG,

Thank you for your response!
To be more specific:
You may imagine that I want to move a robot from point A with start velocity 100 mm/s
and close to point B (distance = 1000 mm) it supposed to be reduced almost to 0.
I need this to be able to stop robot manually if I see that it is going to crush obstacles
(their position may change).
Please, find an image below. I hope my explanations are clear.


RE: Decrease Robot's speed-DavidG-05-07-2019

In that case I would suggest you to add some auxiliary points to your program.
If your actual goal is to do something like
Code:
robot.MoveL(Target01) # Point B
robot.MoveL(Target02) # Point C
and so on...
you can add instructions like this:

Code:
robot.MoveL(Target01) # Point B
robot.MoveL(AuxiliaryPoint01) # Point that is close to Target02
setSpeed(1)
robot.MoveL(Target02) # Point C
setSpeed(100)
If you have your program ready you could do this quite simple with a script you only run once.
Where the additional points have to be placed depends on how certain you are about the position of your objects.
当使用MoveL可以计算的距离between two points and add an auxiliary point at 99% (for example) of the movement. For MoveJ this should also be possible only the math might be a little more tricky.
Please have in mind that this approach is pretty raw.
I am curious what you application looks like. It sounds like you are using a program to move your robot but can not really trust it so that you need the ability to interfere. I am not sure what use the program can be in that case. The question is, how do you proceed after stopping the robot? Do you correct the position of your object? Don't get me wrong, but as of yet it sounds like you could as well move the robot completely manual.
What type of robot are you working with?


RE: Decrease Robot's speed-Civgineer-05-07-2019

Hello DavidG,

Thank you again.
This solution came in my mind at first, but I was wonder if it is possible to do it with one line of code with usage of RoboDK API [acceleration in setSpeed() function].


RE: Decrease Robot's speed-DavidG-05-07-2019

I think the best thing you could do with the setSpeed command is setting the acceleration parameter low so that your ramp function becomes relatively flat. I doubt that this solution is practial to you. The movement time would increase significantly and I think the acceleration parameter might be constraint by the desired speed and the distance (i.e. the travel time).