

Fiducial array with two fiducials  issue billy from United States [10 posts] 
8 year

I am attempting to read the array variables from the fiducial array module.
When a single fiducial is present, the array is just as described on the web site.
However, when two fiducials are present, it seems the values get scrambled. For example the 0 element (confidence %) is well over 100.
I am using Windows 8.1 with Roborealm 2.73.0.
Attached jpg shows the array variable.
What am I doing wrong?
[fiducial_array]



Steven Gentner from United States [1446 posts] 
8 year

Billy,
I think you meant to use FIDUCIAL_CONFIDENCE_ARRAY instead of FIDUCIALS in your first GetArrayVariables. The FIDUCIALS array is a step 17 instead of 1 and contains a bunch of information in one array.
STeven.



billy from United States [10 posts] 
8 year

I attached a screen shot that shows the first several values in the fiducials array when two fiducials are present. Element 0 is supposed to show confidence of the 0th fiducial. It shows 260.
When a single fiducial is present that same element 0 shows a reasonable 96% that matches what the fiducial module lists on the screen.
Don't get distracted by the way I listed the variables to the screen, you can see the issue in the "Available Variables" window. I listed them to the screen the way I did to make sure that the Available Variables window wasn't the issue.
From the web site:
The FIDUCIALS array is composed of 17 numbers as follows:
Offset Contents
0 Match Confidence 0100
1 Point 1 X coordinate
2 Point 1 Y coordinate
3 Point 2 X coordinate
4 Point 2 Y coordinate
5 Point 3 X coordinate
6 Point 3 Y coordinate
7 Point 4 X coordinate
8 Point 4 Y coordinate
9 Translation in X
10 Translation in Y
11 Scale 0100
12 Rotation in X (radians)
13 Rotation in Y (radians)
14 Orientation (Rotation in Z, radians)
15 Path start index
16 Length of path
Refering to the screen shot, you'l seen that element 1 lists the Point 4 Y coordinate, which should be in element 8. Element 0 lists the Point 4 X coordinate which should be element 7.
Element 18 does show a confidence value, so it seems the 2nd set of data is intact. Just the 1st one is messed.
Here is how the data is loaded into the array
0 X4 of 0th fiducial
1 Y4 of 0th fiducial
2 Y translation of 1st fiducial
3 size of 1st fiducial
4 X or Y rotation of 1st fiducial
5 X or Y rotation of 1st fiducial
6 orientation of 1st fiducial
...
18 confidence of the of 0th fiducial
Clearly something messed up when two fiducials are present.



billy from United States [10 posts] 
8 year

I attached a screen shot that shows the first several values in the fiducials array when two fiducials are present. Element 0 is supposed to show confidence of the 0th fiducial. It shows 260.
When a single fiducial is present that same element 0 shows a reasonable 96% that matches what the fiducial module lists on the screen.
Don't get distracted by the way I listed the variables to the screen, you can see the issue in the "Available Variables" window. I listed them to the screen the way I did to make sure that the Available Variables window wasn't the issue.
From the web site:
The FIDUCIALS array is composed of 17 numbers as follows:
Offset Contents
0 Match Confidence 0100
1 Point 1 X coordinate
2 Point 1 Y coordinate
3 Point 2 X coordinate
4 Point 2 Y coordinate
5 Point 3 X coordinate
6 Point 3 Y coordinate
7 Point 4 X coordinate
8 Point 4 Y coordinate
9 Translation in X
10 Translation in Y
11 Scale 0100
12 Rotation in X (radians)
13 Rotation in Y (radians)
14 Orientation (Rotation in Z, radians)
15 Path start index
16 Length of path
Refering to the screen shot, you'l seen that element 1 lists the Point 4 Y coordinate, which should be in element 8. Element 0 lists the Point 4 X coordinate which should be element 7.
Here is how the data is loaded into the array
0 X4 of 0th fiducial
1 Y4 of 0th fiducial
2 Y translation of 1st fiducial
3 size of 1st fiducial
4 X or Y rotation of 1st fiducial
5 X or Y rotation of 1st fiducial
6 orientation of 1st fiducial
...
18 confidence of the of 0th fiducial
Clearly something messed up when two fiducials are present.



Steven Gentner from United States [1446 posts] 
8 year

Billy,
Sorry, as we didn't have the robofile we were using we had to make some assumptions.
Turns out, I'll bet you have the sort array checkboxes set in the Fiducial module? The sorting was happening on a non17 entry boundary which was what was causing the mixing of numbers.
This has been corrected in the most recent version (just uploaded). Can you download and test?
thanks,
STeven.



billy from United States [10 posts] 
8 year

Hey! Really quick service...yes it's working now.
Thanks.

