abb_egm_driver
This repository provides a driver that allows to control ABB robots with ROS-Industrial via the External Guided Motion (EGM) interface. It complies with the ROS Industrial Driver Specification and provides a driver node that enables both trajectory download and real-time motion streaming. To transmit the motions to the robot, this driver uses the abb_libegm, which requires a fee-based ABB software module 689-1 External Guided Motion. To operate the robot, for example to switch on the motors, the abb_librws is used. Note the requirements of abb_libegm and abb_librws regarding the required RobotWare version of the robot controller!
Installation in ROS Noetic and Ubuntu 20.04
Update the operating system:
sudo apt update
sudo apt dist-upgrade
Install required packages:
sudo apt install git swig libnlopt-cxx-dev ros-noetic-nlopt ros-noetic-catkin ros-noetic-moveit
If a workspace does not yet exist in which the driver is to be used, create and initialize it:
mkdir catkin_ws
cd catḱin_ws
mkdir src
catkin init
catkin config --extend /opt/ros/noetic/
cd src
There is no industrial-core package in Noetic yet, so it is cloned and a pull request is applied for compatibility with Noetic:
git clone https://github.com/ros-industrial/industrial_core.git
cd industrial_core
sudo apt install git-extras
git pr 258
cd ..
Clone the EGM driver:
git clone --recursive https://gitlab.cvh-server.de/jweber/abb_egm_driver.git
Build the project:
catkin build
Optional: trac_ik in Noetic
If this driver is to be used with MoveIt, the package trac_ik is necessary, which does not yet exist in Noetic. However, it can be cloned and made compatible with Noetic through modifications:
cd src
git clone https://bitbucket.org/traclabs/trac_ik.git
As described here, the missing dependencies must be added to trac_ik/trac_ik_lib/package.xml. Also, line 35 in trac_ik/trac_ik_lib/include/nlopt_ik.hpp must be changed to
#include <nlopt/nlopt.hpp>
Installation in ROS Melodic and Ubuntu 18.04
Update the operating system:
sudo apt update
sudo apt dist-upgrade
Install required packages:
sudo apt install git swig libnlopt-dev ros-melodic-nlopt ros-melodic-catkin ros-melodic-moveit ros-melodic-industrial-core ros-melodic-trac-ik
If a workspace does not yet exist in which the driver is to be used, create and initialize it:
mkdir catkin_ws
cd catḱin_ws
mkdir src
catkin init
catkin config --extend /opt/ros/melodic/
cd src
Clone the EGM driver:
git clone --recursive https://gitlab.cvh-server.de/jweber/abb_egm_driver.git
Build the project:
catkin build
Preparation of the robot
In order to use this driver with the ABB robot, it must be configured with RobotStudio. The following steps show how to create a robot in RobotStudio and prepare it to work with this driver.
- Create new RobotStudio Solution: File → New → Solution with empty Station → Create.
- Add your robot: Home → Add Library → select your robot.
- Add robot controller: Controller → Add Controller → Add Controller → select your controller. You can either choose a real robot controller on the network or create a virtual robot controller to simulate a robot. Make sure that the RobotWare version of the robot controller is newer than 6.07.01.
- Request write access for controller: Controller → Request Write Access and confirm write access on the control panel.
- Add a UDPUC transmission device: Controller → Configuration → Communication → Transmisson Protocoll, right-click → New Transmission Protocol, type UDPUC, Remote Adress xx.xx.xx.xx (IP of external computer using the abb_egm_driver), Remote Port number 6511 (Default port, which is also used in libegm). Rename the transmission device to “EGM_Transmission”.
- Add a new program module: Controller → RAPID (in the tree on the left side) → T_ROB1 → right-click → New Module.
- Double click on new module, an empty RAPID program opens in the editor. Insert the RAPID EGM code from abb_egm_driver/rapid/EGM_joint_trajectory.mod. Adjust the name of the transmission device in the line with EGMSetupUC to the name that was previously assigned to the newly created UDPUC transmission device.
- Request write access for controller: Controller → Release Write Access, confirm that the changes are to be applied.
- Restart robot controller: Controller → Restart.
- If you are using a virtual robot controller instead of a real robot controller, follow the instructions below.
Optional: Configuration to use a virtual robot controller
RobotStudio can simulate robot controllers and the associated robots. For the virtual controller to be accessible via the RWS interface, it must be configured. To do this, follow these configuration steps.
Driver preparation
Download the [your robot]_support and [your robot]_movit_config packages for the ABB robot you are using (ABB or ABB Experimental). Perform the following steps. An example for the IRB1600 robot is available in this repository and can be used for guidance:
-
Create a copy of the launch file /src/[your robot]support/robot_interface_download[your robot].launch with the name /src/[your robot]support/robot_interface_download[your robot]_egm.launch. In this file the parameters egm_port and rws_ip_address must be created according to the IRB1600 example and passed to abb_egm_driver/launch/robot_interface.launch. The rws_ip_address is the IP address of the robot (can be determined with the Tech Pendant) and the egm_port is the port over which the driver communicates with the robot controller via EGM (default is 6511).
-
Create a copy of the launchfile src/[your robot]_moveit_config/moveit_planning_execution.launch with the name src/[your robot]_moveit_config/moveit_planning_execution_egm.launch. In this file
<include file="$(find abb_[your robot]_support)/launch/robot_interface_download_[your robot].launch" ></include>
must be changed to
<include file="$(find abb_[your robot]_support)/launch/robot_interface_download_[your robot]_egm.launch" ></include>
-
In the launchfile of your project the driver can now be started easily:
<include file="$(find [your robot]_moveit_config)/launch/moveit_planning_execution_egm.launch"></include>