:gear: Using Externally Guided Motion (EGM) to control ABB robots in C#.
Author: Felipe Fronchetti (ffronchetti@lsu.edu)
Last update: 01/07/2024
:new: Our latest application for HoloLens 2 using EGM is now available at: https://github.com/fronchetti/roboart
Disclaimer: This repository is not supported, sponsored, or approved by ABB. Always refer to the official EGM application manual for consistent information.
The organization and authors of this repository are not liable for any consequential damage or injury that any code or information available in this repository may produce to you or others. The code available in this repository should be used only for reading purposes as different robots and settings may act differently during program execution. Use the code and information available here at your own risk, and always make sure you are following all the safety procedures recommended by your robot manufacturer. Robots can be dangerous if used inappropriately, be careful!
EGM is a feature available in RobotWare 6 and 7 that provides external devices the ability to interact and manipulate ABB robots through a network. In this approach, the information is encoded using Google Protocol Buffers and transported through UDP sockets. EGM is a great option for those who need to manipulate an ABB robot from an external device.
For a more detailed explanation, visit the Externally Guided Motion - Application Manual provided by ABB.
In our laboratory, we implement applications in mixed reality that are used to manipulate ABB robots. Such applications are made in Unity using the Microsoft Mixed Reality Toolkit. One of the current limitations of Unity is that it does not accept external development kits, such as the ABB PC SDK. One may argue that other options (e.g., ABB Robot Web Services) could be used to solve this problem, but most of the available alternatives do not allow developers to directly manipulate ABB robots from external devices. For this reason, in our laboratory, we tend to implement communication between devices and ABB robots using EGM. EGM is simple, efficient, and works perfectly with Unity (or any other environment that allows UDP communication in C#).
For those looking for options that are not implemented in C#, please refer to libraries such as abb_libegm (in C++) and abbegm (in Rust).
Is EGM available in all ABB robots? As far as I know, some robots using RobotWare 6 do not support EGM by default. We have a YuMi in our lab, and we had to contact ABB to get access to this feature in our IRC5 controller. My recommendation is to always contact ABB support when you have questions about your robot, especially if they are not available in the documentation.
Does it work with virtual controllers?
The answer is yes, but there are limitations. As far as I am aware, it is not possible to run both the virtual controller and your application on the same machine. The reason is pretty simple, your computer would send and receive messages from both the EGM client and the server at the same time, creating issues in the communication process (e.g., errors from the virtual controller saying that the inbound message is invalid). You also have to make your virtual controller public on the network if you want to control it with an external device. To make it accessible, add a new line containing the external IP address (e.g., <host ip="192.168.0.36"/>
) in the C:\Users\your_username\AppData\Roaming\ABB Industrial IT\Robotics IT\VCConf.xml
file on your computer running RobotStudio. Always check if your firewall allows UDP communication in the port that you are using for EGM, and contact ABB support if something goes wrong. You can also try using different ports on the same computer.
Can I get information from the robot using EGM? Yes, you can. However, the information provided is way more limited than what you can get using the ABB PC SDK. To get general information from the robot using EGM, inspect the message header sent from the robot to the external device using the Egm.cs library provided by ABB. You can also refer to their manual for a better understanding of what kind of information they provide through EGM.
To help developers (and myself) with common issues with EGM, here is a sanity checklist:
If your question is related to the information contained in this repository, feel free to open a new issue.