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

Unable to detect error flags in robot program

#1
Hi,

We are using the Python API to create a Curve Follow Project in RoboDK, to then generate a Robot Program. However, at some points in the generated robot path, the robot reaches a singularity and stops. This is shown in the RoboDK UI by the red X mark on the Curve and by the message "The robot can not reach all targets in the path" (see attached screenshot). How do I check if this error happened using the Python API?

We have tried:
- Using the InstructionListJoints() function from the Item class on the program object we generated, to detect potential error flags (such as 'ERROR_KINEMATIC'), but this always returned the joint information without errors (Message: "Success", Matrix with joints and Status: 22).
- Getting a status by running the program using RunProgram(), but this also returns a positive status of 22.
- Trying to get a status from the Curve Follow Project, assuming it has ITEM_TYPE_CURVE or ITEM_TYPE_MACHINING, but both return invalid.

It seems the Robot Program is not the issue, since it generated 'successfully', can be simulated and returns a positive status (although it not begin complete as it does not contain all the points of the curve it's based on). The problem arises when the Curve Follow Project generates the program, but the generated program does not seem to flag the error when checking its status. There surely must be something we're doing wrong here.

Thanks in advance.

OS: Linux
Python 3.10


Attached Files Thumbnail(s)
Screenshot-crop.png   
#2
If you use the API to generate a program from a curve follow project you should trigger the Update command on the curve follow project item (also know as a robot machining item).

Example:
Code:
cfp = RDK.Item("", ITEM_TYPE_MACHINING)
result = cfp.Update()
program = cfp.getLink(ITEM_TYPE_PROGRAM)
# program.Update() # here, the program is likely to succeed because the curve follow project creates a valid program stopping at the target that gives problems
You can find more information here:
https://robodk.com/doc/en/PythonAPI/robo...tem.Update
  




Users browsing this thread:
1 Guest(s)