UR Mech Viz Pick and Place, label with many zeros

I am using UR 5E, and Mech Viz Pick and Place application. When I want to read what labels I get from the mech Viz, I am having very long array of filled with zeros and in some places the label ID. However, when I check Mech Vision Procedure out, I can confirm that I am outputting proper label list and I don’t see zeros in Mech Viz simulation. However, when I create a program in Teach Pendant and assign label_id variable to label, I am getting crazy long list of zeros. Please take a look at the pictures.

How I can get a proper list of labels, because eventually I want to pick up clips with only certain labels. Thank you.





Hi Ardak
This is not a problem. label is array. label[vision_point] is the label of the picked object. For your case, from Mech-Viz, you received 4 points (total_received), visual move is the 3rd one, so label[3] is the lable you need to use.

Thank you for the reply. However, how can I know where will be the second, third, fourth labels. Because it is not consistently 3rd element, the first label is label[3] , but then you have many more zeros. Because eventually, I want to have control which labels to pick, our project requires that.

Hi Ardak, plz check the guidance by following link


https://docs.mech-mind.net/en/robot-integration/1.7.4/standard-interface-robot/ur-e-series.html

For example, if in Mech Vision, we have a part is labeled as 2.
In URCAP, according to your Mech Viz Screenshot, you will get a label array as
[0,0(home position),0(relative pose),2(vision),0,0,0,0…]
(1) The first digit, which is also index 0 of this label array, is set as 0 by the system. And as the screenshot illustrate, the label of the pose starts as index 1.
(2) The label of the poses except “Vision Move” in Mech Viz will be set as 0, like Relative Move, Fixed Position Move etc.
(3) The label of the “Vision Move” pose will be set as its label in Mech Vision.
(4) In Mech Viz, its default setting is only do and send only 1 planning poses for 1 part every time. Therefore, other digits in this array will be set as 0.

Hi Ardak

If you want to get the picking poses of ≥1 parts, it means you need to plan several parts picking trajectory for 1 time in Mech Viz.
Currently, with your screenshot of Mech Viz, the workflow will only do and send only 1 planning pose to the robot.
It needs some changes.
(1) Slecet the “Result Unused” in Vision Look


(2) Set “Reuse Vision Result” and “Count of Picked Workobjects” in Vision Move
P.S. The count of picked workobjects should be set as a appropriate number. More parts to plan means more cycle time in Mech Viz.

(3) Set the Is Vision Result Used Up as the bottom of workflow, and select the parameter of the previous Vision Move step

After that, triggering Mech Viz by URCAP, you will get the label array of several parts like [0,0,0,1,0,0,0,2,0,…]