Path > Object to Path
Plain SVG
. <path>
objects present.Guide for RoboDK version 5.2.1
C:\Users\formlab\Documents\FORMLAB\UR10\URplotter
URplotter.rdk
with RoboDK.We need to tell the script how big to draw, and what drawing to use.
Edit Python Script
. The VSCodium text editor starts up and opens the python script.SIZE_BOARD
to the size you would like the drawing to be (in millimeters). SIZE_BOARD = [460, 310] #Set the size of the canvas (in mm)
IMAGE_FILE
to the filename of the SVG image. IMAGE_FILE = 'test-image.svg'
The Frame draw
reference frame defines the top-left corner of the image (with the blue arrow pointing towards the viewer). By defining the reference frame from real world robot poses, the real world canvas position and orientation can be set.
Power up the robot arm.
in Robodk, right-click on the UR10 robot, and choose Connect to robot
.
When the connection is open the status bar turns green and shows 'Ready'. Leave the connection window open and right-click on reference frame Frame draw
in the item tree and select Define Reference Frame
.
Change Select Method to 3 point (P1 = origin)
and set 'Calibrate using' to Joints
.
Tip: if you're using a spring-loaded pen holder, add a spacer to the spring, so the pen is retracted a little bit. Then almost touch the canvast with the pen when probing. Remove the spacer before drawing.
get Position
in the connection window. The virtual robot arm should assume the same pose as the real world robot arm.Get p1
Get p2
or Get p3
. Pay attention to the numbers: they should change when you click the button, and they should be different than the other points.Generate robot program
. RoboDK generates a .script-textfile that opens in the 'SciTE' text editor. import program
from the popup window).
the generated program starts at a different position than RoboDK shows.
Temporary fix: in the program instructions: ctrl + click on the first change frame
item. Choose Set Reference Link
. Select UR10 Base
. Then it should work.
Send program to robot
. The robot start moving immediately.RDK.ShowMessage("message", popup = True)
to open a popup and pause the execution of the code at that point.
msg_str = "message: %s" % variable
and use the string in ShowMessage like so:
RDK.ShowMessage(msg_str, popup = True)