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

Change of target coordinates during movement

#1
I am considering real-time robot control using a camera with the Python API. 
Is there a way to change the target during robot movement using MoveL(target, block=False)?
Currently, Robot is repeating movement and stop actions because the next action starts after MoveL is completed.
Please let me know if there is a way to achieve smooth motion.
#2
To make the robot move to new targets it is better to create a new target and a new program that moves to the position you want to move to. When the program completes you can delete the target and/or the program.

You should also be able to move the robot directly to a given pose without having to create a program.
#3
Thank you for your response.
First I want to be able to move on the x, y axis while I press the arrows on my keyboard.
To achieve this, do I create a new target and move program and repeat running this program?

Please let me know if you have a minimum program that can be used as a reference.

Thanks
#4
You can find an example on how to control a robot using a keyboard in our Python documentation:
https://robodk.com/doc/en/PythonAPI/exam...a-keyboard

We also have a Game Controller App to control a robot using a game pad, and the code is open source in our GitHub:
https://robodk.com/addin/com.robodk.app.gamecontroller
https://github.com/RoboDK/Plug-In-Interf...troller.py
Please read the Forum Guidelines before posting!
Find useful information about RoboDK by visiting our Online Documentation.
#5
Thank you for providing so much information.

I immediately tried a sample program using keyboard operations.
(https://robodk.com/doc/en/PythonAPI/exam...a-keyboard)

But the robot moves and stops repeatedly when I press and hold the keyboard.
How can I achieve smooth movement?

I have attached the code, so please let me know if there are any mistakes.


Attached Files
.py   keyboard.py (Size: 4.15 KB / Downloads: 104)
#6
The examples are incremental, meaning that the robot will move one step at a time. You will have to edit the code to have smooth movements.
Please read the Forum Guidelines before posting!
Find useful information about RoboDK by visiting our Online Documentation.
#7
thank you for your reply.
I tried setRounding, but it keeps moving and stopping.
How should I fix it?
#8
You will have to refactor much of the code itself, as the code provided only supports small step increments.
Please read the Forum Guidelines before posting!
Find useful information about RoboDK by visiting our Online Documentation.
  




Users browsing this thread:
1 Guest(s)