Note: 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. |
![]() |
Installation of ROS-Industrial on Fanuc controllers
Description: This tutorial guides you through an installation of the ROS-Industrial programs on Fanuc controllers.Keywords: Fanuc, Roboguide, Industrial, R-30iA, R-J3iC, KAREL, TP
Tutorial Level: INTERMEDIATE
Next Tutorial: Running the ROS Industrial programs
Contents
There are two main steps in setting up a Fanuc arm for use with ROS Industrial: 1) building and installing the necessary KAREL programs, and 2) configuring the controller for use with these programs.
Prerequisites
In order to be able to complete this tutorial, you should have access to the following:
a local checkout of the fanuc_common package from the fanuc stack in the swri-ros-pkg repository
an installation of Fanuc Roboguide1
- a Windows PC or VM (Roboguide does not run on Linux)
- a USB stick or some other method of transferring the necessary files to the controller
In addition to the above, the following software options should be present on your robot (besides basic networking and TCP/IP support):
- KAREL (R632)
- User Socket Messaging (R648)
Building and installing the programs
WIP, but:
- Create Roboguide cell (either from scratch, or from backup of real robot hardware)
Import KAREL sources from fanuc_common package
Build them using Build All from context menu
Export resulting p-code binaries to robot (either use Export→To Loadset, or Export→To Robot)
Configuring the controller
Some additional configuration of the controller is required in order for the ROS Industrial programs to be able to function correctly.
Server TAGs
The ros_state and ros_relay programs make use of the User Socket Messaging software option, and expect two Server TAGs to be available. By default, TAGs 3 & 4 are used, but be sure to configure the correct TAGs in case you changed them in the KAREL sources earlier.
On the TP, open the Host Comm setup screen, and then go to the Server TAG listing using [SHOW]→Servers. Configure both TAGs as follows:
Protocol |
SM |
Startup State |
START |
Inactivity Timeout |
1 min |
The rest of the fields can be left empty or at their defaults.
Go back to the Server TAG listing and start each TAG with [ACTION]→DEFINE, then [ACTION]→START, or restart the control cabinet. Make sure they have been started by re-opening the Host Comm screen (if necessary) and checking the Current State of both TAGs: it should say STARTED.
Payload settings, Tool and User frames
Three additional configuration items influence the behaviour of the robot when used with the ROS Industrial nodes: the arm payload schedule, the configured user frame and the tool frame.
For the payload schedule, input the correct information using the TP on the Motion/Payload Set setup screen. This screen can be found via Menu→Next→System→Motion. Be sure to configure and select the correct schedule. For more information, see [1, Section 9.14].
Configured user and tool frames are (currently) ignored in the ROS Industrial nodes: motion trajectories are specified at joint coordinate (and velocity) level. This is also true for robot state reporting. The use of a user frame coincident with the world frame is however recommended as it helps in debugging and verifying the motion of the arm and the location of the TCP.
Tool frames configured at the robot controller side are also not taken into account by the ROS motion planners: tools should be represented by an appropriate URDF. The combination of the arm and tool URDFs provides similar information to the planning libraries (see also the Create a URDF for an Industrial Robot tutorial). It is however recommended to manually verify the correct tool frame setup on the TP, as the robot controller also uses this information in its safety algorithms.
Go to Menu→Setup→Frames and use the [OTHER] function key to select the User Frame setup screen. Disable the user frame: use the Next button, then press the CLRIND function key (alternatively, configure an all-zeros user frame) 2. Verify the tool frame setup in the Tool Frame screen (again, use [OTHER]). For more information on user and tool frame setup, see [1, Section 3.9].
Notes
As an alternative to Roboguide, WinOLPC / OlpcPRO or even the KCL console could be used to compile the KAREL sources into p-code binaries. These alternatives are not documented in this tutorial, and only the use of Roboguide will be described. (1)
Depending on the configuration and mounting of the arm, an 'all-zeros' user frame may not be the best choice. In those situations, be sure to configure a more suitabe frame. (2)
References
- FANUC Robot Series, R-30iA, Handling Tool, Operator's Manual, B-82594EN-2/02
- FANUC Robot series, R-30iA/R-30iA Mate Controller, KAREL Function, Operator's Manual, B-83144EN/01
- FANUC Robotics SYSTEM, R-30iA Controller, KAREL Reference Manual, MARRC75KR07091E Rev C