openpnp / openpnp

Open Source SMT Pick and Place Hardware and Software
http://openpnp.org
GNU General Public License v3.0
1.66k stars 557 forks source link

Fiducial test without configured pads in package #651

Open ticso24 opened 7 years ago

ticso24 commented 7 years ago

Problem Report

Describe the Issue

Doing a fiducialcheck when the fiducial package has no pad configured results in "Unable to locate first fiducial". There is no information that it can't ever work with the missconfigured package. I only went back to check the manual because the fiducial pipeline editor showed perfect results.

Steps to Reproduce

How can a developer reproduce the issue you are experiencing? Use a step by step format like this: Do a fiducial test with an autocreated fiducial package, which hasn't any pads configured yet.

Expected Result

An error message showing that it failed because the package has no pad at all would be nice.

Actual Result

The current error message missleaded me into thinking it is an optical issue.

vonnieda commented 7 years ago

This was likely introduced when we switched to the pipeline system. We don't really have a good way to relay exceptions from a pipeline to the caller. Currently if a stage throws an exception it gets stored as the model. It may make sense to have have CvPipeline.process throw those exceptions. In this case, the CreateTemplate stage throws an exception because no pads are available, but we don't have a good way to check for it.