Posts by inusO

    Hello everyone,

    I was wondering if it is possible to read somewhere programmatically (e.g. in a system variable) the current disturbance torque on robot axes?
    Or maybe just read somewhere if i am in SRVO-053 Disturbance excess condition?


    I really don't know much about speed limits on single instructions but the actual robot speed during motion instruction depends on many factors and not only the command speed (the speed in the instruction).
    Assuming you have constant override (%) the other thing that affects robot actual speed is the interpolation, in other words, instructions before that one.

    Which instructions are before and after that one in particular? How far are those points?

    I had to implement something like this not long ago, in Kukas you just set override velocity to 0; in Fanuc you can't, because the least the override can be set is 1.
    I tried many ways to stop robot motion, including HOLD and UNHOLD but somehow everything I tried had problems with my server-client application.

    I ended up creating a RPC Karel server listening for commands without any motion group control that delegates motion to another task and for STOP/CONTINUE commands I used the Karel instructions PAUSE_TASK/CONT_TASK (check the manual) on the task with motion


    The server application is writen in karel and should constantly run in the background as a background logic?

    Yes, for your problem the best thing is writing a server in Karel and no, you can't run it on background logic since its purpose is mainly to monitor signals (and you can only run TP code).


    Using the server and client application with socket messaging, is it possible to write and trigger the robot to start a given program from my computer?

    Yes, It is possible (check RUN_TASK and related functions on the manual) and you can achieve that by implementing a simple RPC model.

    It seems like you are stuck on

    READ file_var(tmp_str)

    because he's waiting (blocking) for more bytes, fanuc standard formatting for string should be: first byte containing an integer n indicating the length of the string, and then n characters (the string).
    You can specify your custom binary formatting with specifiers

    First of all you are not following the correct sequence suggested by the link you provided, second seems like you are not waiting for server response before entering a new command and this may cause problems on slow connections, last I don't see any server message (no success or fail) for the command

    get k_test.pc

    This will probably do

    The standard way would be to use regular expression, but as far as I know there isn't support in Karel.
    A workaround here would be to use some IF clauses and the built-in function STR_LEN to identify how your string is structured or maybe check where the ',' is, that depends on the format of your string.
    Once you have to correct lengths you can use SUB_STR as I shown


    is the number of characters always the same? If so, you can just use the built-in function SUB_STR(source_string , start, len) that return a substring of source_string starting from start character and takes up to len characters

    An example would be:

    first_part : STRING[8]
    second_part : STRING[3]
    first_part = SUB_STR(full_line, 1, 8)
    second_part = SUB_STR(full_line, 10, 3)

    Not long ago I created a python script for testing purposes that given the center, radius of the circle and the number of points (resolution of the path) produced an .ls file to perform the movement;
    if you feel it might be of use I'll share it

    Hello everyone,

    since I use Sublime 3 as editor, I wrote a simple custom syntax file to highlight Karel programs and I thought to share it;
    Other than setting different colors to language elements it also allows for quick jumps to ROUTINE declarations within project either by click or Command Palette

    In order to use it you have to place it in C:\Users\<your_username>\AppData\Roaming\Sublime Text 3\Packages\User and then apply it from Sublime by bringing up the Command Palette (ctrl + shift + P) and then select Set Syntax: karel (typing 'syka' in the command palette will do)

    If you find anything wrong or something that needs to be changed feel free to ask here or edit it by yourself