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

ROBODK Line Follow API in Python: Measure Line length

Is there any functionality to get the total length of a curve, or the distance traveled on the curve? For context I'm working on an Automated Fiber Placement project, and it is important to know the total distance traveled before beginning the path for cutting of the tows.
I moved your thread to the API section.
You can use Update on a program to retrieve useful program information, including travelled distance and estimated time. More information here:

So you can do something like:

from robolink import *
RDK = Robolink()
program = RDK.ItemUserPick('Select a program to get estimated travel distance', ITEM_TYPE_PROGRAM)
if not program.Valid():
   quit() # the user cancelled the selection

[n_instructions, program_time, program_distance, valid_ratio, readable_msg] = program.Update()
RDK.ShowMessage('Estimated travel distance is %.1f mm' % program_distance)
Thanks, I think this will work

Users browsing this thread:
1 Guest(s)