|Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.|
Using Simulated Robot in Robot StudioDescription: This tutorial describes how to setup the ABB RobotStudio simulator for use with the ROS-Industrial driver.
Keywords: ABB, Industrial, IRC5, RobotStudio
Tutorial Level: INTERMEDIATE
Next Tutorial: Installing the ABB ROS Server
It's possible to simulate the communication between ROS and an ABB arm, by replacing the real arm by a simulated arm. In this case, there are two PC's: one PC running windows and a simulated ABB arm (called the WINDOWSPC from now on) and one PC running Ubuntu and ROS (called ROSPC from now on).
The following steps will guide you for setting up the environment on the WINDOWSPC:
Install ABB RobotStudio from the ABB website. Note that there is a 30-days trial version of the software, but that you will need a license in the long run (RobotStudio is a very powerful tool with many options. You can look online for tutorials or have a look at the RobotStudio forum).
The following steps will set up a robot arm able to communicate with ROS in RobotStudio:
Open RobotStudio by clicking on the icon that was placed on the desktop during installation.
- In the opening dialog, create an empty station.
Select ABB library and pick the robot type you want to model.
The robot is spawned. You can zoom (scroll wheel), move (CTRL+drag mouse) and rotate (CTRL+SHIFT+drag mouse).
Select Robot System and choose From Layout...
Give the system a name, leave the rest of the options untouched and press Next >.
There should be only one mechanism, so just press Next >.
Click Options... and select 616-1 PC interface and 623-1 Multitasking.
Install RAPID Files
Before continuing in RobotStudio, you need to put the RAPID files of the ROS driver on the controller of the created arm.
Go to <documents_directory>\RobotStudio\Systems and select the folder corresponding to the name of your station.
Open the HOME directory.
Create a new directory called ROS.
As the GetSysInfo(..) function does not return a valid IP address when used in RobotStudio (it returns "VC" instead of the IP of your Windows machine), we need to change something in the ROS_socket.sys source file.
Make sure your Windows PC has a static IP configured. In the example below, we'll assume that this IP is 192.168.1.1. If your workstation does not have a static IP address, you'll have to repeat the below changes each time your IP address changes.
Now open ROS_socket.sys and change the following line:
IF (SocketGetStatus(server_socket) = SOCKET_CREATED) SocketBind server_socket, GetSysInfo(\LanIp), port;
IF (SocketGetStatus(server_socket) = SOCKET_CREATED) SocketBind server_socket, "192.168.1.1", port;
note: you must use the IP of your workstation running RobotStudio, as the shows here is only an example.
Install ROS-I Driver
You are now ready to install the ROS-Industrial driver in RobotStudio:
Select the tab controller and then FlexPendant. This is a simulated version of the FlexPendant on the real robot on which you need to install the driver.
First go into MANUAL mode by selecting the button left from the joystick and turning the key in the upright position.
You can now follow the installation instructions from the ABB install server tutorial.