Shift base of robot based on correction in another base - Vision

  • Hello,


    I have vision system from Kuka - Visiontech. I have static camera mounted near the robot. Camera is calculating the position of hole relative to reference hole in Calibration base[10].

    When camera told me hole is shifted X 10 and Y 10 it is in the base[10].


    Now I want to shift another base[2] based on this Correction from camera. I want to transfrom correction X10 Y10 in base[10] to Base[2]. Can someone help me pleas also with some explenantion. I know about geometric operator and INV_POS and I think with these operators it will work but I am not sure how to do it.


    Thank you in advance.


    Jaro

  • MOM

    Approved the thread.
  • Thank you very much for fast reply.


    Now I think I understand how does it work. It is not so complicated when you have it on picture.


    Now I only have to make: BASE_DATA[3] = INV_POS(B2):C0 right ? And move to the point originally in base 10 in base 3.

    (Base 3 would be new shifted base 2)


    Or based on the picture for creating new shifted base I need to make : BASE_DATA[3] = B2:C2 ?

    Edited once, last by Jaroo ().

  • I tried to paint what i mean and I will try to explain my whole application.


    I have the machine which is welding nuts on the sheet metal on some hole. I will come with part holding by robot under the camera - take the picture and check the correction C10 which camera tells me relative to reference posiiton of the hole. This correction is in Base10. It is some vector X,Y in Base10.

    Now I want to shift base 2 (It is base of the machine where is the welding proces) for a vector X,Y and create shifted base 3. In the base 2 i will have Positions, which I want to shift when the hole is not on the correct position.


    The problem is that the orientation of the base 2 and base 10 it doest have to be the same so I need to make some transfromation, becasue when the hole is shifted 10mm in X in base 10 it is not equal to shift the base 2 for 10mm in X. It will depends on the mutal angle of these bases.

    Simplify, I need to transform pink vector in base10 to a vector in base2, like so it wont be X10 but it will be in the situation maybe -7.


    Correction.png">


    So now, when I am thinking, your picture is not correct for this situation. I said it incomprehensible.

    Maybe my whole Idea is wrong and it can be done in different and easier way.

    Edited 2 times, last by Jaroo ().

  • OK, let us start with the correction for B[10]:

    How does the frame looks like?

    {X10, Y 10, X ?, A ?, B ?, C ?}


    Can we replace the question marks by Zero?

    {X10, Y 10, X 0, A 0, B 0, C 0}


    Do you have numeric examples for B[10], C10 and so on?

  • My data are:


    Base of the machine :
    BASE_DATA[2]={X 1716.18,Y 493.45,Z 228.25,A -135.0,B 0.0,C 0.0}


    Base calibration :
    BASE_DATA[10]={X 1588.71411,Y 375.542847,Z 274.394867,A -46.6705933,B 0.368454278,C -179.589218}


    C10 is output from 2D static camera. It wil be in my situation only a few mm in X and Y, no rotation because it is a circle, for example :
    {X 10, Y 10, Z 0, A 0, B 0, C 0}

  • Other posibility is to shift my actual tool. It will be better I guess.


    I have tool T2 TOOL_DATA[2]={X 980.0,Y -0.02,Z 370.02,A 0.0,B -90.0,C 0.0}


    And want to shift this tool based on the correction from camera C10. Point in which I come under the camera is with tool 2 and in base 2. After the photo with camera I want to move to the base 2 with the corrected tool - corrected about C10.


    I think with both ways I will get the same result ( If I shift the base I think I will need to shift it in the oposite direction with -1)

    I do not know if it is important informaton but I used external tool. The base 2 is like external tool.

    Edited once, last by Jaroo ().

  • I assume you taught the "nominal" Vision and Nut-Weld positions such that, when the Vision system returns 0,0, the robot moves to the correct position.


    MOM is much better at this than I am, but the key factor is the A and C differences. One Base has the Z+ axis pointing up, and the other has it pointing down. I don't suppose you could align the two?



    If the two Bases Z axes aligned, you could probably get by by just rotating the shift by ~88deg in A. Something like C10 : {X 0,Y 0,Z 0,A 88,B 0,C 0}


    Just for a quick approximation, let's treat the A difference as -90deg, and the C difference as 180deg. This means that the Vision X offset should be applied to Machine Base Y, and the VIsion Y offset should be applied to Machine Base X.


    The proper mathematical solution should look something like:

    Machine_Base_Offset = (INV_POS(Vision_Base) : Machine_Base) : Vision_Offset


    I've almost certainly got that slightly wrong, but it should be easy to test. Deliberately set your Vision Offset to something like X=25 Y=50, run that math on it, and see if it moves in the correct directions in the Machine base.

  • Hello Guys,


    Sorry for late answer.


    I asked for help my colleague and it works now. His idea was to shift the tool which I used not to shift the base. I am using external tool, I am not sure if it is important.


    The code is like this:

    num_shift_tool = 12


    ;Correcton from camera in Calibration FRAME (Base 10)

    Correction = VT_GetCorrectionFrame(Results[ObjectCounter])

    ;The tool correction is calculated here

    Delta_tool = INV_POS($POS_ACT_MES) : Correction :$POS_ACT_MES

    ;The tool car0 is adjusted here

    TOOL_DATA[num_shift_tool] = TOOL_DATA[$ACT_TOOL] : Delta_tool


    On the picture I tried to explain. Red arrows are the calculation of Delta tool.


    Thank you very much for your help.


    ">">

Advertising from our partners