Camera with Geometric

  • Hi,

    KRC 4

    I am having a base_Data[5]. I am receiving a pos through Camera(3D) with orientation(a,b,c) also. The camera co-ordinate is from Base_Data[5](the camera reference point is Base_Data[5])

    Base_Data[5] ={ 1287,1070,500,6.5,15, 3.5 }
    Camer pos received : {30,12,1.23, 9.5,0.55, 2.31}
    pos Campos = {30,12,1.23, 9.5,0.55, 2.31}

    In geometric operator

    LIN Base_Data[5]:Campos will this go the correct Pickpos OR Lin campos:Base_Data[5] ??? :hmmm:

    Thanks in advance.

  • AD
  • Pickpos = Base_Data[5]:Campos.

    This will generate an offset base using the Campos values.
    Don't forget afterwards to add activate that base:

    $Base = Pickpos

    Every problem has a solution, that isn't the problem. The problem is the solution.

  • Pickpos is what you want it to be, in my example i used it as a base. you need that variable to store your new base in, and it is most of the time not the smartest idea to write over your old base value. so for clarity:

    Frame New_base ;define new frame variable for your new base
    New_base = Base_data[5]:Campos ;make an offset of your old base using the camera values
    $base = Newbase  ;Activate your new base
    LIN Pickpos  ;Move to desired position

    Every problem has a solution, that isn't the problem. The problem is the solution.

  • That is a difficult one, I have in no way enough knowledge to explain this, but it does matter. Sometimes it looks like just simply adding all values but that is a coincidence.
    I must admit i only learned how to use the geometric operator not the math behind it. :uglyhammer2:

    Every problem has a solution, that isn't the problem. The problem is the solution.

  • The ":" is called the Geometric Operator in KRL. It is a method of "multiplying" two 6DOF (XYZABC) frames by each other. This is done by converting the two frames into 4x4 matrices, performing cross-multiplication on them, and converting the resulting matrix back into XYZABC.

    (side note: in KRL, a FRAME variable is XYZABC. A POS or E6POS variable is just a FRAME with more variables -- S, T, E1-E6. The Geometric Operator will work on any of them, but for this math, only the XYZABC values matter)

    However, unlike "normal" multiplication, matrix multiplication is not commutative. That is, while 2*3=3*2, MatrixA*MatrixB != MatrixB*MatrixA.

    The most basic way of explaining how this works in robotics is this:
    1. Set a Base
    2. Program a Pos in that Base
    3. The numbers in the Pos will be a set of directions, starting from the 0,0,0,0,0,0 of the Base:
    4. Move along Base X by the value of Pos X, then along Base Y by the value of Pos Y, then along Base Z by the value of Base Z
    (at this point, the TCP is still oriented the same as the Base -- A, B, and C are all 0.
    5. Rotate around the Z axis by the value of Pos.A
    6. Rotate around the new Y axis by the value of Pos.B (this is where people start to get confused)
    7. Rotate around the new X axis by the value of Pos.C

    Now, you can daisy-chain these transforms. For instance, if you had Pos programmed in Base1, and you wanted to know what the Pos would be if you converted it to World, you could do this:
    PosInWorld = $WORLD : BASE_DATA[1] : Pos
    This works because all Bases are simply transforms from World, and all Pos are simply transforms from whatever Base they were programmed in.

    Now, as for swapping which Frame is on the left or right of the Geometric Operator, it's basically swapping which Frame acts as the Starting Point. If I use BASE:POS, I get the directions to move from the Base's origin (all zeros) to the location and orientation of the Pos. However, if I do POS:BASE, I get the reverse directions -- that is, if I pretended the Pos was actually a Base, I could find the directions to get back to the Base origin starting from the Pos.

    It sounds weird, but it's very valuable when doing Vision Guidance, Palletizing, and oddball operations like translating a Pos from one Tool or Base to another Tool or Base.

    For example, I once had a drilling end effector where the drill was parallel to my TCP Z axis. And I had to "land" it on variable surfaces using 6DOF vision. Well, when I was done drilling, I needed to pull the drill straight back out of the hole, but because I was landing on uneven surfaces, I couldn't make any pre-programmed points to do that motion. Instead, I could use one of two methods:
    LIN_REL {Z -20} #TOOL ; method 1
    LIN $POS_ACT : {X 0,Y 0,Z -20,A 0,B 0,C 0} ; method 2

    Now, both those work. But the advantage to the send method is that I could pre-calculate the escape motion, and check if it would move too far, or hit a limit, before I began physically moving. The LIN_REL method, on the other hand, would simply start moving, and fault the robot if it hit something. So doing the Geo-Op math could be valuable for deciding if a move was safe or not.

  • Base_Data[5] ={ 1287,1070,500,6.5,15, 3.5 }
    BASE_DATA[12]={X 0.0,Y 0.0,Z 0.0,A 0.0,B 0.0,C 0.0}
    Camer pos received : {30,12,1.23, 9.5,0.55, 2.31} (camera pos is with ref to basedata5)
    pos Campos = {30,12,1.23, 9.5,0.55, 2.31}
    POS Before = {0,0,-100,0,0,0}
    POS After = {10,0,-100,0,0,0}

    I don't want to move the base. I like to move only the pick pos.

    pos Pickpos = {0,0,0,0,0,0}

    LIN Base_Data[5]:Pickpos : Beforepos;
    LIN Base_Data[5]:Pickpos ;(am I right? The rob goes pickpos from Base_Data[5]?)
    LIN Base_Data[5]:Pickpos : Afterpos;

    Pickpos = {0,0,0,0,0,0}


    Edited once, last by knowledgesharing ().

  • Usually, with a fixed camera aligned with a robot Base frame, you do want to move the Base, temporarily. That makes it easy to move multiple points (BeforePick, Pick, AfterPick, etc) as a group.

    Of course, you want to keep Base5 as a permanent setup, matched to the camera. So your normal action in the program would be $BASE = BASE_DATA[5] : CameraData.

    However, if you want to avoid changing the Base, then you can move the point. Exactly how depends on what Base the points are taught in.
    If the points are taught in $WORLD (Base 0): LIN BASE_DATA[5] : CameraData : PickPosition
    If the points are taught in Base 5, it's simpler: LIN CameraData : PickPosition

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now