RobotStudio event

[EGM] External Guided Motion

Options
Dear ABB Support,

I am currently trying to implement the new EGM control in a .Net desktop application.
- I compiled the .proto
- I compiled the .cs into a dll
- I referenced this dll and imported the abb.egm namespace in a new VB.net project
- I installed Google Protocol Buffers via NuGet in my project
- I translated the demo file (in C#) to VB.Net, and activated the "remove integer overflow check" in order to have an equivalent cast of DateTime.Now to proper 32B UInt without having an overflow (as used in the demo message header).

Everything seems to work fine: I receive and send messages, and my virtual robot in RS 6.0 x64 is not triggering any timeout, so it's receiving my messages too. The timestamps & sequance numbers are matching the ones of the demo as well. But nothing is moving (while in the demo a movement is triggered with these same values), and I get no error at all. Is there any way to activate some kind of error handling for EGM? Because I have no way to find the problem...

Also, this could come from the protobuf library itself (protobuf-csharp-port, as used in the example files, seems to be C# only) --> Do you have an exemple using protobuf net, which seems to be compatible with VB? .proto files are not used by this second library.

Thank you in advance,
Best regards,
Thibaut

«1

Comments

  • Jaco Cronje
    Options
    I've got EGM "working", but the movement is VERY slow. I based my code on the C example provided with RobotStudio.
    I had to change the rapid code a bit, the example code does not provide movement all the time, put the Act and Run commands in an infinite while loop
  • I got it working in C# as well but my question concerning .Net protobuf support in general is still open. The RAPID exemples are indeed triggering extremely slow convergence, and are inexact, but it's not so difficult to write your RAPID procedure to get much better results.
    It seems that a lot of things are still missing though (no feedback messages, buggy speedref messages).
  • jordi saboya
    Options

    Hi,

    I try to do a rapid programm only with EGM RAPID code following the examples writed on documentation.... but I cannot reach to understand what is the relationship with frames amb movements

    when I am doing changes in Group Inputs. The mechanical unit is moving but it is doing to wrong directions :-((.

    The question is, the robot must follow the path and change it base on the value of group input in this case?


    Here is the code:

    MODULE maimMod


    TASK PERS tooldata tFroniusCMT:=[TRUE,[[12.3313,-0.108707,416.142],[0.903899,-0.00320735,0.427666,0.00765917]],[2.6,[-111.1,24.6,386.6],[1,0,0,0],0,0,0.072]];


    TASK PERS wobjdata wobj_EGM1:=[FALSE,TRUE,"",[[150,1320,1140],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];


    TASK PERS wobjdata wobj_EGM2:=[FALSE,TRUE,"",[[0,1000,1000],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];


    CONST jointtarget jpos10:=[[0,0,0,0,35,0],[9E9,9E9,9E9,9E9,9E9,9E9]];


    CONST robtarget p30:=[[1500,0,1500],[0.322151,-0.601023,0.672381,0.287914],[0,0,-1,0],[9E9,9E9,9E9,9E9,9E9,9E9]];


    CONST robtarget p20:=[[150,1320,1140],[0.000494947,0.662278,-0.749217,-0.00783173],[0,0,-1,0],[9E9,9E9,9E9,9E9,9E9,9E9]];


    VAR egmident egmID1;


    VAR egmident egmID2;


     


    CONST egm_minmax egm_minmax_lin1:=[-100,100];


    CONST egm_minmax egm_minmax_rot1:=[-2,2];


    CONST egm_minmax egm_minmax_joint1:=[-0.1,0.1];


     



    ! CONST jointtarget jpos10:=[[0,0,0,0,35,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];


     


    CONST pose posecor:=[[1200,400,900],[1,0,0,0]];


    CONST pose posesens:=[[12.3313,-0.108707,416.142],[0.903899,-0.00320735,0.427666,0.00765917]];


     


    ! corr-frame: world, sens-frame: world


    VAR pose posecor0:=[[1500,0,1500],[1,0,0,0]];


    VAR pose posesen0:=[[1500,0,1500],[1,0,0,0]];


     


    !TASK PERS tooldata tFroniusCMT:=[TRUE,[[12.3313,-0.108707,416.142],[0.903899,-0.00320735,0.427666,0.00765917]],[2.6,[-111.1,24.6,386.6],[1,0,0,0],0,0,0.072]];


    TASK PERS loaddata load1:=[5,[0,1,0],[1,0,0,0],0,0,0];


    ! corr-frame: wobj, sens-frame: wobj


    ! TASK PERS wobjdata wobj_EGM1:=[FALSE,TRUE,"",[[150,1320,1140],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];


    VAR pose posecor1:=[[0,0,0],[1,0,0,0]];


    VAR pose posesen1:=[[0,0,0],[1,0,0,0]];


    ! TASK PERS wobjdata wobj_EGM2:=[FALSE,TRUE,"",[[0,1000,1000],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];


    VAR pose posecor2:=[[150,320,0],[1,0,0,0]];


    VAR pose posesen2:=[[150,320,0],[1,0,0,0]];


    PROC main()


    MoveAbsJ jpos10\NoEOffs,v1000,fine,tFroniusCMT;


    testAO;


    ENDPROC


    PROC testAO()


    ! Get two different EGM identities. They will be used for two different eGM setups.


    EGMGetId egmID1;


    ! EGMGetId egmID2;


    ! Set up the EGM data source: Analog output signals and configuration "default"


    ! One guidance using Pose mode and one using Joint mode


    EGMSetupGI ROB_1,egmID1,"default"\Pose\giR1x:=giX\giR2y:=giY\giR3z:=giZ;


    !EGMSetupAO ROB_1,egmID2,"default"\Joint\aoR1x:=ao_MoveX\aoR2y:=ao_MoveY\aoR3z:=ao_MoveZ\aoR4rx:=ao_RotX\aoR5ry:=ao_RotY\aoR6rz:=ao_RotZ;


    ! Move to the starting point - fine point is needed.


    MoveJ p30,v1000,fine,tool0;


    ! Set the signals


    ! Correction frame is the World coordinate system and the sensor measurements are also relative to the world frame


    ! No offset is defined (posecor0 and posesen0)


    EGMActPose egmID1\Tool:=tFroniusCMT\WObj:=wobj0,posecor0,EGM_FRAME_WORLD,posesen0,EGM_FRAME_WORLD\x:=egm_minmax_lin1\y:=egm_minmax_lin1\z:=egm_minmax_lin1\rx:=egm_minmax_rot1\ry:=egm_minmax_rot1\rz:=egm_minmax_rot1\LpFilter:=20\SampleRate:=16\MaxPosDeviation:=1000;


    ! Run: keep the end position without returning to the start position

    EGMRunPose egmID1,EGM_STOP_HOLD\x\y\z\RampInTime:=0.05\PosCorrGain:=16;

    ! Move to the starting point - fine point is needed.

    MoveJ p20,v1000,fine,tFroniusCMT;

    ! Set the signals

    ! Run with the same frame definitions: ramp down to the start position after having reached

    ! the EGM end position

    EGMRunPose egmID1,EGM_STOP_RAMP_DOWN\x\y\z\RampInTime:=0.05\PosCorrGain:=16;

    ! Move to the starting point - fine point is needed.

    MoveJ p30,v1000,fine,tool0;

    ! Set the signals


    EGMReset egmID1;

    ENDPROC


    ENDMODULE



    Thank you

    BR

    Jordi

    Jordi Saboya
  • lukas_s
    Options
    Hi, I got EGM working based on the sample code provided by RobotStudio. As a first test it's getting a constant signal from an UdPUC device. I've tried EGM in joint and in pose mode and it always gets to the correct position. However, the movements are extremely slow no matter in which direction or to which destination. Changing the position correction gain or the default proportional gain seems to have no influence at all. It feels like there is some kind of speed limitation because it always moves at the same speed. Does anybody know how to get the EGM movements considerably faster?
  • Did anyone manage to solve the problem of slow EGM motions?

  • orjanmehre
    Options
    Did anyone manage to solve the problem of slow EGM motions?

    To speed things you can use "\MaxSpeedDeviation", see example below. 
     But if this is set to high (bigger then 10) I get a: "Dynamic load too high" error. Is there someone who know how I can fix this without reducing the speed?

    EGMActPose egmID1\Tool:=UISpenholder \WObj:=wobj0, posecorTable,EGM_FRAME_WOBJ, posesenTable, EGM_FRAME_WOBJ 
                \x:=egm_minmax_lin1 \y:=egm_minmax_lin1 \z:=egm_minmax_lin1
                \rx:=egm_minmax_rot1 \ry:=egm_minmax_rot1 \rz:=egm_minmax_rot1\LpFilter:=20\Samplerate:=4\MaxSpeedDeviation:= 10;
  • orjanmehre
    Options
    To speed things you can use "\MaxSpeedDeviation", see example below. 
     But if this is set to high (bigger then 10) I get a: "Dynamic load too high" error. Is there someone who know how I can fix this without reducing the speed?

    EGMActPose egmID1\Tool:=UISpenholder \WObj:=wobj0, posecorTable,EGM_FRAME_WOBJ, posesenTable, EGM_FRAME_WOBJ 
                \x:=egm_minmax_lin1 \y:=egm_minmax_lin1 \z:=egm_minmax_lin1
                \rx:=egm_minmax_rot1 \ry:=egm_minmax_rot1 \rz:=egm_minmax_rot1\LpFilter:=20\Samplerate:=4\MaxSpeedDeviation:= 10;
  • orjanmehre
    Options
    To speed things you can use "\MaxSpeedDeviation", see example below. 
     But if this is set to high (bigger then 10) I get a: "Dynamic load too high" error. Is there someone who know how I can fix this without reducing the speed?

    EGMActPose egmID1\Tool:=UISpenholder \WObj:=wobj0, posecorTable,EGM_FRAME_WOBJ, posesenTable, EGM_FRAME_WOBJ 
                \x:=egm_minmax_lin1 \y:=egm_minmax_lin1 \z:=egm_minmax_lin1
                \rx:=egm_minmax_rot1 \ry:=egm_minmax_rot1 \rz:=egm_minmax_rot1\LpFilter:=20\Samplerate:=4\MaxSpeedDeviation:= 10;
    Was able to avoid the "Dynamic load too high" error by reducing the bandwidth of the low- pass filter.
  • What values for low pass filter and gain are you using, if I may ask?
  • orjanmehre
    Options
    My value for the lowpass -filter is 5. Haven't set a value for gain, so I guess it is set to one by default
  • arnasIV
    Options
    Where can I find more info about EGM? Like a manual or a code example? Google doesn't reveal it that easily..;/
  • orjanmehre
    Options
    arnasIV said:
    Where can I find more info about EGM? Like a manual or a code example? Google doesn't reveal it that easily..;/
    The module is quite new so there is not a lot of information out on the web. I'm writing a master's thesis about EGM and my primary source of information has been the "

    Application manual - Controller software IRC5", document ID: 3HAC050798-001. 

    All the instructions and functions you need in RAPID are listed in "Technical reference manual RAPID Instructions, Functions and Data types" . 

    Last semester I did a project on EGM where I created two programs which you are welcome to use as an example, they are both available on Github. See the links at the bottom.  

    Both programs where implemented on an Irb 140 robotic arm, and the code is written in C# and RAPID. 

    In the first program I've made a slider to adjust the height (z-cord) of the robot while it moves in a square (xy- plane) . 

    In the second program a Kinect sensor is used to control the movements of the robot in a 2D - plane. 

    The source code in both projects are a mess (we had limited time on the project so I did not have time to clean it up), but they will give you a good idea of what's needed to create an application using EGM. 


    https://github.com/orjanmehre/EGM_Slider.git

    https://github.com/orjanmehre/Kinect_Program.git

  • arnasIV
    Options
    I'm grateful!
    Just a thought - is it possible to combine PC SDK and EGM ?
  • orjanmehre
    Options
    It should be possible, but I don't know enough about PC SDKs and to make them, so I can't be 100% sure. Maybe someone else knows the answer. 
  • carlosmtz2000
    Options

    As long as you have both options enable in the system, it will work. The next question is the resource that you are trying to modify in the robot controller. EGM as today allows you to access motion data, while PC SDK gives you access to much more information.

    Do you have an example of what you are trying to do?

    Carlos Martinez
    ABB
  • arnasIV
    Options
    At the moment I am just changing x, y position based on the computer vision application I have built, and some times I interrupt the execution of "MoveL" with a variable named "state" from a windows application. 
    Shortly:
    RAPID:
    ....
    CONNECT perslint WITH iroutine1;
     IPers state, perslint;
    ...
    MoveL Offs(home, x_pos, y_pos, 0), velocity, fine, puck\WObj := wobj0;
    ...
    C#:
    ....
    private ABB.Robotics.Controllers.RapidDomain.RapidData state_robot_rapid = null;
    private ABB.Robotics.Controllers.RapidDomain.RapidData y_robot_target_rapid = null;
    private ABB.Robotics.Controllers.RapidDomain.RapidData x_robot_target_rapid = null;
    ...
    private Mastership mastership = null;
    ...
    tRob1 = ctr1.Rapid.GetTask("T_ROB1");
    .....
    mastership = Mastership.Request(ctr1.Rapid);
    ....
                        if (interrupt)
                        {
                            if (state_cp.Value == 1)
                            {
                                state_cp.Value = 0;
                                state_robot_rapid.Value = state_cp;
                            }
                            else
                            {
                                state_cp.Value = 1;
                                state_robot_rapid.Value = state_cp;
                            }
                        }
                        y_robot_target_rapid.Value = y_pos_cp;
                        x_robot_target_rapid.Value = x_pos_cp;


    The result I get is 0.5 s delay before the robot starts the movement after the values are changed.
    Since, the project I am working on requires a fast response from a robot(objects are moving up to 10 m/s) I came to the conclusion that it might be impossible to accomplish it with an ABB robot, only today have I found out about so called EGM. Still, I have no idea if it requires some sort of licence to implement it as my university is short of them.
  • carlosmtz2000
    Options

    EGM will help you to get a better performance. The first question I have is related to your hardware to check if it supports this robotware option.


    Whicn robotware version do you have installed in your controller? Can you share the serial number, and if possible, a picture of the main computer.


    BR


    Carlos Martinez
    ABB
  • arnasIV
    Options
    The lab staff told me that the current version installed was 6.02 as it was on the computer, but I've just checked it myself using flexpendant and I can see that it's RW5.15_02.00.2005
    Serial no: 120-501087
    Probably it's the reason why it says in the rapid program "Identifier not found: egmident".
  • carlosmtz2000
    Options

    EGM is a Robotware option that is available in RW 6.x.  You could check if the robot has another system or backup with RW 6.02, and then check if EGM is enabled in that system. If not, you will need a new license.

    Carlos Martinez
    ABB
  • arnasIV
    Options
    It doesn't and I think if a special licence is required for EGM they won't have it either. Is there another way to reduce the delay?
  • graemepaulin
    Options

    There are some options available in RW5  like sensor interface and optical tracking that may be of use  (not had any experience with them my self) - these are options you would need to add to the system.

    If you are at a educational facility then you should talk to your local ABB they should be able to help (ABB have educational packages available).

  • Arnab
    Options
    where can i get egm.proto?? there is another problem that when i am compiling the program "EGMsmallTest" program is not being found..please help me
  • rzhao
    Options
    arnasIV said:
    Where can I find more info about EGM? Like a manual or a code example? Google doesn't reveal it that easily..;/
    The module is quite new so there is not a lot of information out on the web. I'm writing a master's thesis about EGM and my primary source of information has been the "

    Application manual - Controller software IRC5", document ID: 3HAC050798-001. 

    All the instructions and functions you need in RAPID are listed in "Technical reference manual RAPID Instructions, Functions and Data types" . 

    Last semester I did a project on EGM where I created two programs which you are welcome to use as an example, they are both available on Github. See the links at the bottom.  

    Both programs where implemented on an Irb 140 robotic arm, and the code is written in C# and RAPID. 

    In the first program I've made a slider to adjust the height (z-cord) of the robot while it moves in a square (xy- plane) . 

    In the second program a Kinect sensor is used to control the movements of the robot in a 2D - plane. 

    The source code in both projects are a mess (we had limited time on the project so I did not have time to clean it up), but they will give you a good idea of what's needed to create an application using EGM. 


    https://github.com/orjanmehre/EGM_Slider.git

    https://github.com/orjanmehre/Kinect_Program.git

    Hi, I have a question about EGM. Is it possible to simulate EGM in RobotStudio? For example, to move a robot using mouse through the virtual controller. 
    Thanks a lot !
  • orjanmehre
    Options
    rzhao said:
    Hi, I have a question about EGM. Is it possible to simulate EGM in RobotStudio? For example, to move a robot using mouse through the virtual controller. 
    Thanks a lot !
    Yes, that is possible. Just set it up like you would with a real robot and use a virtual controller
  • rzhao
    Options
    rzhao said:
    Hi, I have a question about EGM. Is it possible to simulate EGM in RobotStudio? For example, to move a robot using mouse through the virtual controller. 
    Thanks a lot !
    Yes, that is possible. Just set it up like you would with a real robot and use a virtual controller
    Thank you for your reply. I am very new with RobotStudio. So far I don't find too much info about EGM. I am looking for a detailed introduction showing how to start with EGM. I saw someone mentioned 'example code' provided by ABB. Could you give some hints where I can find them? Cheers.
  • kazoo
    Options
    Hi, I have a question regarding EGM. In the manual, it says that external devices communicating with the controller via Analog Signals, Group signals or an Ethernet link (UDP). Is it possible to use TCP/IP socket too? Also, if anyone succeeded the mouse control mentioned above, could you let me know which communication protocol is used?
  • kazoo
    Options
    Hi, this would be an easy question for whom already purchase EGM. Is EGM the license option for RobotStudio or for IRC? If I purchase one EGM license, can I use it for several robots?
  • mathias
    Options
    I am not able to locate the egm.proto file on a recently installed IRC5 controller installed with RW6.04.


    I admit my documentation is from an earlier RW-version. It says the egm,proto-file is located in:

    OntheIRC5Controller: <SystemName>\PRODUCTS\<RobotWare_xx.xx.xxxx>\utility\Template\EGM\


    Has this changed in 6.04?
  • kazoo
    Options
    Hi mathias, it doesn't matter where you put egm.proto file. All you need to do is compile that protofile to make protobuf file, then you could import it to your main program (C# and so on, but not RAPID).
  • mathias
    Options
    Hi kazoo, thanks for your reply. However, my contact at the robot site is unable to *locate* the proto file in the 6.04 system. Where is it located?