Staubli T40 rotating gripper alongside sinusoide

  • I am working on my program for a final dissertation and I stuck with a problem. The program includes the move to push forward an object and then move to the safe position to activate the camera shutter to test the use of robots in stop-motion animation.
    I have assigned (X, Y) for a sinusoidal path. However, when the robot moved an object (a car) alongside the path it did not move the gripper toward the sinusoidal path and all the motion and position of the car looked unnatural. I added a table with value A for a rotation of the gripper but I cannot find any formula any equation to calculate the values. Do you have any idea if there are equations to calculate value A (degree of the gripper) for a sinusoidal path??


    :help:

  • It should be possible to create a series of path point locations with all components {X, Y, Z, RX, RY, RZ}. Relative either to the robot base frame or a defined user frame. I have done this hundreds of times.


    If the robot is properly calibrated, the end of arm tooling is correctly defined, and the robot is healthy, the robot should move the object along the path as you expect.


    One problem I would anticipate is in the event that the arm joints are commanded to rotate beyond their axis limits. The arm will make adjustments to continue motion point-to-point. But it will not be correct nor smooth. This condition is corrected by starting the path with the axes near the other extreme limit. In this way the path motion will "un-wind" the axes and never experience a limit.


    Another problem (since you appear to be a student) is that the robot has suffered abuse in academic use. Perhaps it is not healthy. Simple tests of straight line moves can be performed to verify correct command and motion.


    You may consider posting your code for evaluation by the community.

  • pLocal=pPick


    open(tTool)

    //Request number of loops for true/false delay IO
    put("Please enter the number of loops you require for delay ")
    get(Loop_IO)
    putln(Loop_IO)

    // reset i j variables to zero
    j=0
    i=0
    for i = 0 to 26



    movel(appro(pLocal,trApproc), tTool, mSlow)
    movel(pLocal, tTool, mSlow)
    waitEndMove ()
    close(tTool)
    //movel(appro(pLocal,trApproc), tTool, mSlow)


    //Increment the X value by the i variable
    pLocal.trsf.x=pLocal.trsf.x+StopFrame2x[i]

    //Increment the X value by the j variable
    pLocal.trsf.y=pLocal.trsf.y+StopFrame2y[i]

    //rotate gripper in Z by the G_Angle value multiplied by the loop counter
    pLocal.trsf.rz=pLocal.trsf.rz-StopFrame_A[i]


    //movel(appro(pLocal,trApproc), tTool, mSlow)
    movel(pLocal, tTool, mSlow)
    waitEndMove ()
    open(tTool)
    movel(appro(pLocal,trApproc), tTool, mSlow)
    //movej(jStart,tTool,mFast)
    waitEndMove ()


    // Move the robot out of the way of the camera
    //movel(pSafe, tTool, mSlow)

    movel(appro(pLocal,trSafe), tTool, mSlow)
    //movej(jStart,tTool,mFast)
    waitEndMove ()



    putln (i)

    //Make cameraa take a picture ie set IO 15 true - dragon frame trigger
    dio_trigger = true

    // delay IO to false - this delay is so the camera can have time to take a picture
    for Cam_delay = 0 to Loop_IO

    dio_trigger = false
    endFor

    // increment across to next y value
    //j = j + 1


    waitEndMove ()





    endFor
    putln ("End Program")
    end

    Student working on research - Staubli Robot use in Creative Tech.

  • open(tTool)


    // Request user to input number of point acround the circle
    put("Number of points. ")
    get(D)
    putln(D)



    // Request user to input the Radius
    put("Radius. ")
    get(R)
    putln(R)

    //Request number of loops for true/false delay IO
    put("Please enter the number of loops you require for delay ")
    get(Loop_IO)
    putln(Loop_IO)

    // reSet Angle increment
    Increment = 360/D
    // Gripper angle to rotate
    G_Angle = Increment
    //Reset Angle variable to zero
    Angle = 0

    // pCentre_point- centre of circle - define at robot
    pLocal=pCentre_point
    // Move to the centre of the circle and pick up peg
    movel(appro(pLocal,trApproc), tTool, mSlow)
    movel(pLocal, tTool, mSlow)
    waitEndMove ()
    close(tTool)
    movel(appro(pLocal,trApproc), tTool, mSlow)

    //This for to loop simple calulates the X and Y values and moves to them.
    for i = 0 to D
    // pCentre_point- centre of circle - define at robot
    pLocal=pCentre_point

    //move to circumference X and Y values to be calulated based on R = Radius
    x = R*cos(Angle)
    y = R*sin(Angle)


    //Increment the X value
    pLocal.trsf.x=pLocal.trsf.x+x


    //Increment the Y value
    pLocal.trsf.y=pLocal.trsf.y+y

    //rotate gripper in Z by the G_Angle value multiplied by the loop counter
    pLocal.trsf.rz=pLocal.trsf.rz-G_Angle
    putln ("Gripper angle ")
    putln(pLocal.trsf.rz)
    putln("Print rotation angle ")
    putln(Increment)

    movel(appro(pLocal,trApproc), tTool, mSlow)
    movel(pLocal, tTool, mSlow)
    waitEndMove ()
    open(tTool)
    movel(appro(pLocal,trApproc), tTool, mSlow)
    waitEndMove ()


    // Move the robot out of the way of the camera
    movel(pSafe, tTool, mSlow)
    waitEndMove ()


    //Make cameraa take a picture ie set IO 15 true - dragon frame trigger
    dio_trigger = true

    // delay IO to false
    for Cam_delay = 0 to Loop_IO
    endFor

    dio_trigger = false

    //Move back to the peg and pick it up
    movel(appro(pLocal,trApproc), tTool, mSlow)
    movel(pLocal, tTool, mSlow)
    waitEndMove ()
    close(tTool)
    movel(appro(pLocal,trApproc), tTool, mSlow)
    waitEndMove ()

    //Print info to screen
    putln (i)
    putln (Angle)
    Angle = Angle+Increment
    G_Angle = G_Angle+Increment
    endFor
    putln ("End Program")


    //Code to send cylinder to centre point
    movel(appro(pCentre_point,trApproc), tTool, mSlow)
    movel(pCentre_point, tTool, mSlow)
    waitEndMove ()
    open(tTool)
    movel(appro(pCentre_point,trApproc), tTool, mSlow)
    waitEndMove ()
    movel(pSafe, tTool, mSlow)



    end

    Student working on research - Staubli Robot use in Creative Tech.

  • There must be a way to add formula to calculate the values automatically without guessing and writing each value separately in the table. It looks like a nightmare if I had to calculate 200 points and insert their values manually.

    Student working on research - Staubli Robot use in Creative Tech.

  • It would help if you provide a sketch of your path and the location of your path relative to the robot base coordinate system. Sketch it, photograph/scan it, post it.


    Do not provide I/O and camera commands, those only confuse the issue. Focus on the geometry commands only next time.


    How many different paths do you have?

  • The path is 100 cm with the point zero in a safe position. I have checked this is the path that a robot can easily move an arm with no limitations. The size of the actual car is 20 cm /7 cm. I need to find an option of autoatic calculation of the path and degree in the program.

  • I will assume that your sketches indicate a mathematically-defined path y = A*SIN(Bx). If that is the case then this simple enough.


    Here is how I would approach the problem:


      • Build a simple pointer tool and attach to tool flange. Define an accurate tool transform for the pointer tool.

      • Use the pointer tool to teach three locations for an arbitrary frame on the table top.

      • In your code, calculate the frame transform. This will allow you to move the path anywhere on the table top or in 3D space by re-teaching three points only. Using a frame also will correct tilt and skew in your work surface and provide a method of alignment.

      • Calculate your move location as a function of (x) with the following steps:

      • Set a 1st calculation loop for a small increment (e.g., 1 mm spacing).

      • Set a 2nd calculation loop for a desired move step increment (e.g., 10 mm spacing).

      • For each (x,y) point pair in 2nd loop, use the next small increment point to calculate the approximate tangent to the curve (through the next small increment point)

      • Use this data to calculate and determine a rotation about the point's Z-axis.

      • Calculate & transform the rotated point relative to the arbitrary frame. Be sure to properly calculate all of the point's orientation values correctly.

      • Move to the point.

      • Increment loops and repeat until done.


    If you do not have a path that is defined by a math expression, then your options:


      • Create a data list of the points and calculate individually.

      • Figure out a method to import data from a text file and calculate individually.

      • Use CAD-based Offline Programming Tools to develop a series of path points and use that as location data.

Advertising from our partners