I have a problem importing trajectories into RDK from my Python script when I want to have the position data displayed in relation to a custom coordinate system as a reference frame. However, if I use the global coordinate system in RDK (reference_object=0) everything works fine. As soon as I change the coordinate system, I get the error:
and
I think the format of the Data is correct and the reference frame with the name "Rahmen99" is already created in RDK :(
I am showing you this script as a not working example script with the hope someone can help me:
Code:
WARNING: Invalid curve, a 3xN (or 6xN) list of points must be providedCode:
Exception: Invalid item provided: The item identifier provided is not valid or it does not exist.I think the format of the Data is correct and the reference frame with the name "Rahmen99" is already created in RDK :(
I am showing you this script as a not working example script with the hope someone can help me:
Code:
from robodk.robolink import * # Import RoboDK API
from robodk.robomath import * # Import für Mat, etc.
import numpy as np
RDK = Robolink()
roboter = RDK.Item('UR10e', ITEM_TYPE_ROBOT)
RUN_ON_ROBOT = True
roboter.setConnectionParams('192.168.1.50', 50002, '/programs/', 'root', 'easybot')
# Referenzrahmen finden
frame = RDK.Item('Rahmen99', ITEM_TYPE_FRAME)
if not frame.Valid():
raise Exception("Referenzrahmen 'Rahmen99' nicht gefunden!")
# Punkte definieren: XYZ Positionen in mm (relativ zu Rahmen99)
kurven_punkte = [
[100, 0, 200],
[200, 100, 200],
[300, 0, 200]
]
#kurven_punkte = robomath.Mat(punkte_matrix)
# Kurve im RoboDK erstellen (als Objekt)
kurve = RDK.AddCurve(kurven_punkte, frame, add_to_ref=False, projection_type=0)
if roboter.Valid():
path_settings = RDK.AddMillingProject("Bewegungstest_Pfad")
prog, status = path_settings.setMillingParameters(part=kurve)
prog.RunProgram()

