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

Controlling Curve Follow Project's Frame Offset

#1
Hello,

I'm wondering how to set the "Frame offset" coordinates for a curve follow project. I know to use `project.setPose` to set the "Path to tool offset " coordinates and `project.setPoseTool` to set the "Tool offset" coordinates, but how to I set the "Frame offset" coordinates via the API?

cfp.png   
#2
You can set the Frame offset on a robot machining project or a curve follow project by using the setPoseFrame function of the API.

Let me know if you have any issues with that.
#3
(05-15-2025, 10:10 PM)Albert Wrote: You can set the Frame offset on a robot machining project or a curve follow project by using the setPoseFrame function of the API.

Let me know if you have any issues with that.

Hi Albert, 

When try to run the last line of code below, I get a TimeoutError 
Code:
frame_offset: list[float] = data.get("frame_offset")
if frame_offset is not None:
    project.setPoseFrame(robomath.Fanuc_2_Pose(xyzwpr=frame_offset))
#4
Where is the timeout exactly happening? What version of RoboDK are you using?

If would help if you check simply running something like this:
Code:
project.setPoseFrame( transl(10, 20, 30) )
#5
(05-15-2025, 10:37 PM)Albert Wrote: Where is the timeout exactly happening? What version of RoboDK are you using?

If would help if you check simply running something like this:
Code:
project.setPoseFrame( transl(10, 20, 30) )

Thanks Albert. I tried your suggestion and it still throws a TimeoutError at the `project.setPoseFrame` line. I've had success with the `setPoseFrame` method when I pass an item of ITEM_TYPE_FRAME in as a parameter, but when I try to pass a pose (robodk.robolink.Mat) it throws the TimeoutError
#6
Good point. I was able to reproduce the timeout issue, however, the pose is still properly set on the robot machining pose.

We'll fix this issue soon with a new update.

A quick workaround for the time being would be to use a try/except to skip this error and create a new instance of the Robolink connection. The following code should work as a workaround:
Code:
itm = RDK.Item("", ITEM_TYPE_MACHINING)
pose_frame = transl(100,200,0)

# Workaround setting the frame for a robot machining project
try:
    RDK.COM.settimeout(0.01)
    itm.setPoseFrame(pose_frame)
except Exception as e:
    print("Expected timeout error for RoboDK 5.9.1 and earlier versions")
    print(str(e))
finally:
    # Create a new instance of Robolink
    RDK = Robolink()
    print("Done")
#7
(05-19-2025, 10:31 AM)Albert Wrote: Good point. I was able to reproduce the timeout issue, however, the pose is still properly set on the robot machining pose.

We'll fix this issue soon with a new update.

A quick workaround for the time being would be to use a try/except to skip this error and create a new instance of the Robolink connection. The following code should work as a workaround:
Code:
itm = RDK.Item("", ITEM_TYPE_MACHINING)
pose_frame = transl(100,200,0)

# Workaround setting the frame for a robot machining project
try:
    RDK.COM.settimeout(0.01)
    itm.setPoseFrame(pose_frame)
except Exception as e:
    print("Expected timeout error for RoboDK 5.9.1 and earlier versions")
    print(str(e))
finally:
    # Create a new instance of Robolink
    RDK = Robolink()
    print("Done")

Thank you Albert. We will take a look at implementing this.
  




Users browsing this thread:
1 Guest(s)