← Jobb

Python path generation

Budget: $20.0 - $40.0 HOURLY / PART_TIME ⭐ 0.00 (0) Canada

python, python-script, numpy, automation

I have an existing Python program that generates robot application trajectories from contours detected by a camera. The program receives recipe parameters from a PLC, including: -filling direction and spacing; -offset around holes; -offset from the exterior edge; -other robot application parameters. The current program works correctly in most situations. The problem occurs in narrow passages between: -two holes; -a hole and the exterior contour. When the available passage is too narrow compared with the offsets requested by the PLC recipe, the two offset trajectories overlap or leave insufficient space. The program then attempts to merge them into one centered trajectory, but in certain geometries the merge can be: -off-center; -disconnected from the surrounding trajectories; -connected to the wrong trajectory; -shaped with small square or zigzag links; -replaced by an incorrect diagonal connector; -partially missing. For example, if the PLC requests an 8 mm offset on both sides but the physical passage is only 10 mm wide, both requested offsets cannot fit. In that situation, the program should locally ignore the requested offsets and create one trajectory centered in the passage. The important requirement is that the existing logic must remain unchanged everywhere it already works. Only narrow passages below a defined threshold, currently approximately 10 mm, should use the special merge logic. The expected behavior is: -Detect the real local width using the original contours, independently of the PLC offsets. -Identify only the portion of the passage that is below the width threshold. -Remove only the conflicting offset trajectories in that local portion. -Generate one trajectory exactly centered between the two boundaries. -Connect that centered trajectory to the correct surrounding trajectories. -Avoid unnecessary intermediate points, square links, long diagonals and incorrect global stitching. -Apply the same logic to hole-to-hole and hole-to-exterior-contour passages. -Preserve the current PLC recipe handling, trajectory ordering and robot export format. The program uses Python, Shapely, NumPy, scikit-image skeletonization and Matplotlib. I can provide the complete program, PCD test files, PLC recipe files, screenshots of incorrect results and repeatable test cases.
Öppna på Upwork