byte-motion / RNL_RAPIDLibrary

A standard library of functionality for the RAPID programming language
MIT License
0 stars 1 forks source link

Add module for advanced motion #60

Open TheHarvard opened 3 years ago

TheHarvard commented 3 years ago

We should collect advanced motion instructions in a single module.

I know @RobotSigmund has some motion features in the SS library.

Here is a preliminary list of ideas for advanced motion commands:


MODULE RNL_B_AdvancedMotion

    !function that returns true if point is reachable
    FUNC bool isReachable(INOUT robtarget ToPoint,INOUT tooldata Tool,\INOUT wobjdata WObj)
    ENDFUNC

    !Complex function to navigate from one point to another, while avoiding obstacles
    !Is going to take a while to develop
    PROC MoveNavigate()
        <SMT>
    ENDPROC

    !Offset functions for robtargets

    !same as offs()
    FUNC robtarget offPos(robtarget Point,\num x,\num y,\num z)
        <SMT>
    ENDFUNC

    !convert a robtarget so that a given cartezian axis is set to an absolute value
    FUNC robtarget absPos(robtarget Point,\num x,\num y,\num z)
        <SMT>
    ENDFUNC

    !convert a robtarget so that the wrist (tool0) points in a absolute direction
    !Takes either an orient as parameter, or euler angles
    FUNC robtarget absWrist(robtarget Point,\orient direction,\num x,\num y,\num z)
        <SMT>
    ENDFUNC

    !convert a robtarget so that the wrist points in a direction offset from its current direction
    !Takes either an orient as parameter, or euler angles
    FUNC robtarget offsWrist(robtarget Point,\orient direction,\num x,\num y,\num z)
        <SMT>
    ENDFUNC

    !convert a robtarget by offsetting one or multible axis by a value
    FUNC robtarget offsAx(robtarget Point,
        \num ax1\num ax2\num ax3\num ax4\num ax5\num ax6
        \num ex_a\num ex_b\num ex_c\num ex_d\num ex_e\num ex_f)
        <SMT>
    ENDFUNC

    !convert a robtarget by setting one or multible axis to a absolute value
    FUNC robtarget absAx(robtarget Point,
        \num ax1\num ax2\num ax3\num ax4\num ax5\num ax6
        \num ex_a\num ex_b\num ex_c\num ex_d\num ex_e\num ex_f)
        <SMT>
    ENDFUNC

    ! Move instructions

    !Move only axis 1, 2, and 3 when moving (joint) to a point
    PROC MoveAx123(INOUT robtarget ToPoint,INOUT speeddata Speed,INOUT zonedata Zone,INOUT tooldata Tool,\INOUT wobjdata WObj)
        MoveJ ToPoint,Speed,Zone,Tool\WObj?WObj;
    ENDPROC

    !Move axis 4 and 5 so that the tool0 TCP points in a given direction
    PROC MoveAx45(orient direction,INOUT speeddata Speed,INOUT zonedata Zone,INOUT tooldata Tool,\INOUT wobjdata WObj)
    ENDPROC

    !Move vector - Move a vector (direction and lenght), relative to current position
    PROC MoveV(INOUT pos v,INOUT speeddata Speed,INOUT zonedata Zone,INOUT tooldata Tool,\INOUT wobjdata WObj)
    ENDPROC

    !Move to an absolute position from current position
    PROC MoveAbs(\num x,\num y,\num z,INOUT speeddata Speed,INOUT zonedata Zone,INOUT tooldata Tool,\INOUT wobjdata WObj)
    ENDPROC

    !Move an offset in x,y,z fom current position
    PROC MoveOffs(\num x,\num y,\num z,INOUT speeddata Speed,INOUT zonedata Zone,INOUT tooldata Tool,\INOUT wobjdata WObj)
    ENDPROC

ENDMODULE
TheHarvard commented 2 years ago

Additional featurs: