CHECK_EPOS built-in, finding the right parameters -how to get the UTOOL and UFRAME in KAREL as POSITION data type

  • Hi dear robot-forum community!

    I have again some problems with the lovely KAREL language. I have a LR Mate 200iD/7L with a R-30iB Mate cabinet Controller and I build a socket communication between my PC and the robot. So i can set a position register with the value i send from the PC. Before moving to this position I would like to check if this position is even reachable. Therefore I try to use the built-in CHECK_EPOS procedure. In the Karel manual is the following syntax for this procedure:

    Syntax :CHECK_EPOS (eposn, uframe, utool, status <, group_no>)

    Input/Output Parameters :

    [in] eposn :XYZWPREXT

    [in] uframe :POSITION

    [in] utool :POSITION

    [out] status :INTEGER

    [in] group_no:INTEGER



    :•eposnis the XYZWPREXT position to be checked.

    •uframespecifies the uframe position to use witheposn.

    •utoolspecifies the utool position to use witheposn.

    •statusexplains the status of the check. If the position is reachable, the status will be 0.

    •group_no is optional, but if specified will be the group number foreposn. If not specified thedefault group of the program is used.

    My problem is that i don't get the values for the parameters uframe and utool. Is there a way to set a user defined variable in the data type position to the Tool Number 1 (e.g.) and the frame to the world frame/ user frame whatever?

    I already tried to set a Position variable for the uframe like this:





    but then i can't set the Orientation or even set the tool. Does anybody knows a way to just set my variable to the tool or frame with the number (1,2,3,4,....)??
    Thanks a lot for any help!

  • AD
  • Herman, yeah your way worked!

    dha i tried, and yes it works too,when you pass it as $UTOOL/$UFRAME or $MNUFRAME[1,1]/$MNUTOOL[1,1]. but i wasn't sure because the status from the CHECK_EPOS Position was never 0(reachable)

    I fixed it by adding the optional (obviously not so optional) paramter group_no. Now the status returns a correct value.

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