gavanderhoorn / fanuc_driver_exp

An alternative - experimental - Fanuc robot driver for ROS-Industrial
Apache License 2.0
29 stars 17 forks source link
driver fanuc karel ros-industrial

fanuc_driver_exp

An alternative - experimental - Fanuc robot driver for ROS-Industrial.

Overview

Main differences with fanuc_driver:

Note on performance

While this implementation of a ROS driver for Fanuc controllers has improved upon fanuc_driver already, it could still be improved quite significantly. This is especially true for the motion performance, both in terms of maximum attainable robot velocity as well as in the trade-off between smoothness and accuracy (or: path / trajectory reproduction).

With the current understanding of Fanuc controller internals it would appear that the trade-off between motion smoothness and trajectory reproduction accuracy (ie: CNT) will always be a limiting factor to any kind of external motion control with Fanuc controllers (that use(d) publicly available interfaces to that controller).

Dense trajectories will cause significant slowdown of the robot leading to total path execution duration significantly exceeding the specified timestamps. Coarse trajectories will lead to inaccurate motions, but higher maximum robot velocity attained.

The current implementation (with a single point buffer and a minimum TP program to execute the motion) does not permit the controller to make use of its look-ahead functionality, which severely bottlenecks it and leads to suboptimal motion in almost all cases (in terms of velocity and continuity: the robot will still reach the commanded position(s)).

This driver is therefore better suited to pick-and-place type of applications (ie: discrete motions in which the goal positions are more important than the path itself) and less for applications that require accurate control over all aspects of the motion at all times (ie: continuous applications in which the path itself is as-important or more important than the final destination).

Installation

Installation using a binary distribution is preferred, but building from sources is also supported.

Binaries

Determine the system software version running on the target controller, then download the latest binary distribution from the releases page.

Extract the zip file to a suitable location and follow the steps under Copying.

Source build

Note: the below steps use Dirk Thomas' vcstool to clone all required repositories with a single command (vcstool can be installed under Windows using pip). This can also be done manually: just git clone .. each of the repositories listed in the repos.repos file.

In a rossum workspace (on a Windows machine with Roboguide):

wget https://raw.githubusercontent.com/gavanderhoorn/fanuc_driver_exp/master/repos.repos
vcs import --input repos.repos
mkdir build
cd build
rossum -r ..\fanuc_driver_exp\robot.ini ..
ninja

Now continue with copying the necessary files.

Copying

Using the provided scripts

This is the recommended way to install.

Note: the following steps refer to removable media. This can either be a USB stick (FAT32 formatted), or a PCMCIA memory card. Refer to the relevant Fanuc documentation for more information.

  1. Extract the binary distribution zip file to the root of the removable medium.
  2. Check and make sure the install.cm, uninstall.cm and the product directory are in the root of the drive. Placing them in sub directories will not work.
  3. For a USB stick, insert it either into the TP, or in one of the ports on the controller. For a memory card, insert it into the slot on the controller.
  4. Using the TP, browse to the root of the device that corresponds to whichever removable medium contains the driver's files.
  5. Highlight the uninstall.cm file, press ENTER. Some warnings may be expected, if files were / are not present.
  6. Highlight the install.cm file, press ENTER.

Status output is printed to the TP and the installation process should complete with a confirmation shown on the screen.

An installation log is written to the removable medium (install.log).

Manually

This method of installation is recommended only when customising the Karel programs or if using a removable medium or the installation scripts is not possible.

Copy the following files to the controller:

If this is a fresh install, run the RSTATE_CFG and the RTRAJ_CFG programs once.

Configuration

Configuration is similar to that of fanuc_driver. See fanuc_driver/wiki/cfg for more information (but note that fanuc_driver_exp has additional configuration entries which have not been documented yet).

Note that upon startup, both ROS_STATE as well as ROS_TRAJ will check their configuration. If any item is not present or set correctly, or the CHECKED item is not set to TRUE, a FILE-032 Illegal parameter error will be shown on the TP and the programs will be terminated. In that case open the Karel Vars of the faulting program (either ROS_STATE or ROS_TRAJ) and update the configuration. Make sure everything is correct, and finally set CHECKED to TRUE.

Running

Start the ROS TP program, then follow the normal fanuc_driver workflow.

License

Unless stated otherwise, all code under the Apache 2.0 license.