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

Change robot speed while performing a move command

Hi, I am trying to implement some safety measures in my simulation environment. What I need to do is to update at runtime the allowed speed of my robot based on its position relative to a second robot performing another task.

I have tried to implement this using a multithreaded configuration in which the first two threads are used to issue commands to the robots (one in each thread to execute the tasks in parallel) and the third thread performs a distance check between the two and changes the speed of the first robot using the setSpeed command.

My problem is that in reality the setSpeed command only modifies the allowed speed before issuing a command to the robot, so what I see during the simulation is that the robot finishes executing the MoveJ/MoveL command before modifying the allowed speed and performs the speed modification only for the next move.

So my question is: Is there any way to implement this scenario using the python API?
You should split a large movement into smaller movements. This will allow you to update the speed before triggering a new movement. This replicates the behavior that most robots have.

On the other hand, you can adjust the simulation speed by calling setSimulationSpeed. This will simply change the speed ratio that RoboDK runs the simulation. You can call this function in a parallel thread and it should immediately take effect.

Users browsing this thread:
1 Guest(s)