Installation of the driver

Important

This tutorial assumes familiarity with Fanuc controller cabinets, the Teach Pendant (iPendant) and the Roboguide environment. For more information on any of the steps in this tutorial, consult the documentation on these subjects provided by Fanuc Robotics.

Overview

This tutorial guides you through all the steps necessary to install the ROS-Industrial driver programs onto a Fanuc Robotics controller. After installation, the programs and controller will need to be configured, which will be described in Configuration of the driver.

All of the steps outlined in this tutorial can be used for setting up a real controller as well as a simulated one in Roboguide. For a source install, the only difference is in the Copying the Binaries step: Roboguide automatically loads the binaries onto the virtual robot controller as part of the build process, so no additional action is needed. For a binary install, the copy destination is the virtual controller instead of the real one.

Note that these tutorials only cover the installation and setup of those programs of the fanuc_driver package that are supposed to run on the controller. For help on installing ROS-Industrial in general, please see the ROS-Industrial installation pages.

Finally: this tutorial assumes the use of an iPendant. For users with older (legacy) pendants, this may mean that key sequences given in the text, screenshots and menus will not match completely. Due to the lower resolution of legacy pendants, many key sequences need either an additional NEXT inserted, or (sub)menus should be opened using TYPE.

Installation options

There are two options for installation: from source or using a set of precompiled binaries. In general, a binary install is recommended, as it is much faster and less involved (note: there are currently no KAREL binaries available for the Indigo version of the driver, thus a source install is always necessary for that version). After choosing a compatible version, only a small number of files have to be copied to the controller.

If it is not possible to use the provided binaries, a source install is the only option. This may be the case if the target controller runs an incompatible version of the KAREL runtime, if it cannot support access to KAREL Vars or if there is a requirement to use customised driver code. A source install is more complicated, as it necessitates the creation of a Roboguide workcell, and the compilation of several source files.

The same configuration procedure is used for both installation types.

Prerequisites

For a binary install, the following is needed:

  • a compatible binary distribution of the KAREL and TP binaries [1]
  • a method of transferring the necessary files to the controller (USB stick, a network connection)

For a source installation, requirements are:

  • a copy of the fanuc_driver package, version 0.2 or newer
  • an installation of Fanuc Roboguide [2]
  • a Windows PC or VM (as Roboguide does not run on Linux)
  • a method of transferring the necessary files to the controller (USB stick, a network connection)

In all cases, the following software options should be present on your robot in addition to basic networking and TCP/IP support:

  • R632 - KAREL
  • R648 - User Socket Messaging

Information on the installed software options can be found by consulting the documentation that came with your robot. Alternatively, the Version ID submenu of the STATUS screen can be used. On the TP: Menu NEXT STATUS Version ID, then CONFIG (or F3). The same information is available on the Summary Configuration/Status webpage, which should be accessible if your controller has the web server option installed.

Important

Make sure your controller has a correctly configured and working network setup. Verify you can ping the controller from your ROS pc. Refer to the relevant documentation for instructions on how to configure networking on a Fanuc industrial robot controller.

If you’ve chosen to perform an installation using the precompiled binaries, please proceed to the Binary Install section. For an installation from source, continue with the next section.

Source Install

Before the ROS-Industrial programs can be transferred to the robot controller, they need to be compiled into binaries. We’ll use Fanuc Roboguide for this.

Creating a Workcell

First, create a new workcell in Roboguide, either by using the wizard or by creating a copy from your actual robot controller. When using the wizard, be sure to select the correct Application package, as well as the correct robot type. On the software options screen, also make sure to select at least options R632 - KAREL and R648 - User Socket Messaging.

New workcell wizard: KAREL and USM options

After completing the wizard, you should end up with an empty workcell with just your robot in the middle of it. If you chose to create a copy of the controller, the Cell Browser might show programs and files that were already present on the robot under the Programs and Files sections. As long as they do not conflict with the ROS-Industrial KAREL programs, they can be ignored.

Importing

ROS-Industrial Karel and TPE programs in the Files section of the Cell Browser

In the Cell Browser, import the KAREL and TPE sources into the workcell using the Project Add Files menu option. Browse to your local fanuc_driver package and select all *.kl files in the karel sub directory not ending in _h.kl or _t.kl.

For fanuc_driver version 0.3.0 and up, just select all .kl files in the karel sub directory.

Click the Open button to add them to the Cell Browser.

Now add the *.ls files in the tpe sub directory as well. The Files section in the Cell Browser should contain at least the files shown.

Building

ROS-Industrial Karel and TPE programs in the Programs section of the Cell Browser

Now build all files by selecting Project Build All in Roboguide (if you have other source files under Files, build only those shown in the Importing section). No errors or warnings should be reported, and the Programs section in the Cell Browser should show the compiled binaries (TPREC is a default program and is not a part of ROS-Industrial).

Now continue with Copying the Binaries.

Binary Install

A Roboguide workcell is not needed for a binary install: all that is required is a copy of the necessary binaries. They should be compatible with the software installed on the target controller, as well as with the installed version of fanuc_driver (so version 0.2.0 of fanuc_driver must be used with version 0.2.0 of the precompiled binaries).

From the Binaries section on the fanuc_driver page, download the correct version and extract it in some temporary location. You should end up with a directory containing several .pc and .tp files. Make sure the names correspond to those listed in the Building section.

We can now continue to copy the extracted files to the target controller.

Copying the Binaries

Finally, the binaries need to be transferred to the controller. This can be done by direct transfer over a network connection (FTP) or by using a mass storage device (such as a USB stick or PCMCIA memory card). Refer to the relevant Fanuc Operator’s Manual for the tool package installed on the robot controller for information on how to copy files using removable media [3]. Refer to the Roboguide help files for information on how to perform network transfers of files to robots [4].

Note

Updating older versions of the ROS-Industrial KAREL programs may result in a MEMO-159 or VARS-014 error. See MEMO-159: Convert failed in PROG in that case. TP programs are always overwritable, provided none of them are loaded as the current program (ie: loaded through the Program Select window).

After copying the binaries onto the robot controller, open the Program Select window by pressing the Select button on the TP, then [TYPE] KAREL Progs.

If the KAREL programs do not show up on the TP, or you cannot change the display TYPE to KAREL Progs, make sure the KAREL support has been properly setup on your controller. See KAREL programs are invisible on the Program Select window on the Troubleshooting page.

Make sure the following programs are listed (note that the revision numbers may be different):

ROS-Industrial Karel programs on the controller after installation

Also check to make sure the necessary TPE programs are present by pressing [TYPE] TP Programs. You should see the following programs (the -BCKEDT- program is not part of ROS-Industrial):

ROS-Industrial TPE programs on the controller after installation

The ROS-Industrial programs are now installed on the controller.