Show EOL distros: 

industrial_core: industrial_deprecated | industrial_msgs | industrial_robot_client | industrial_robot_simulator | industrial_trajectory_filters | industrial_utils | simple_message

Package Summary

industrial robot client contains generic clients for connecting to industrial robot controllers with servers that adhere to the simple message protocol.

industrial_core: industrial_deprecated | industrial_msgs | industrial_robot_client | industrial_robot_simulator | industrial_trajectory_filters | industrial_utils | simple_message

Package Summary

industrial robot client contains generic clients for connecting to industrial robot controllers with servers that adhere to the simple message protocol.

Overview

The industrial_robot_client package provides a standardized interface for controlling industrial robots, based on the ROS-Industrial Specification. This package includes a C++ reference implementation of the specification, using the simple_message protocol to communicate with a compatible server running on a standalone industrial robot controller.

Primarily, this package provides the industrial_robot_client library. The intent is for robot-specific implementations to reuse code from this library using standard C++ derived-class mechanisms, to avoid much of the copy/paste duplication in current industrial-robot driver implementations. Modification to adapt the library to new robot needs is discussed in more detail below.

This package also provides generic nodes exposing the base industrial_robot_client functionality. If a robot does not require any specific client-side code, then it may be sufficient to run these standard nodes. This page describes this usage in more detail.

Modification for Robot-Specific Needs

Often, differences between manufacturer interfaces and robot designs will require changes to the basic reference implementation provided in the industrial_robot_client library. Joint-coupling, velocity scaling, and communications protocols are all potential reasons for robot-specific control code.

Rather than make a new copy of the entire ROS client codebase, it is recommended that the integrator use a derived-class approach to only re-implement the minimal functionality required. Wherever possible, the new code should call the base class reference-implementation functions to avoid code duplication and maintain consistent operations. It may be helpful to review the library's design to determine which functionality may need replacing. Simple joint reordering and renaming can be handled through existing capabilities, as described here.

Example

The following example shows how to replace the reference velocity calculation (0-100% of max-velocity) with an absolute velocity algorithm.

  1. Create a new derived class, based on JointTrajectoryDownloader (or JointTrajectoryStreamer)

       1 class myRobot_JointTrajectoryDownloader : JointTrajectoryDownloader
       2 {
       3 ...
       4 }
    
  2. Override specific functionality. In this case, the velocity calculation.
       1 class myRobot_JointTrajectoryDownloader : JointTrajectoryDownloader
       2 {
       3 
       4 public:
       5   bool calc_velocity(const trajectory_msgs::JointTrajectoryPoint& pt, double* rbt_velocity)
       6   {
       7     if (pt.velocities.empty())
       8       *rbt_velocity = SAFE_SPEED;
       9     else
      10       *rbt_velocity = std::min(pt.velocities.begin(), pt.velocities.end());
      11 
      12     return true;
      13   }
      14 }
    
  3. Implement a new node, using an instance of the appropriate derived-class.
       1 int main(int argc, char** argv)
       2 {
       3   // initialize node
       4   ros::init(argc, argv, "motion_interface");
       5 
       6   myRobot_JointTrajectoryDownloader motionInterface;
       7   motionInterface.init();
       8   motionInterface.run();
       9 
      10   return 0;
      11 }
    

Further examples

Further examples of creating robot-specific interfaces may be found in the following code samples:

Contact us/Technical support

For questions about this package or ROS-Industrial in general, please contact the developers by posting a message in the ROS-Industrial category on ROS Discourse.

Reporting bugs

Use GitHub to report bugs or submit feature requests. [View active issues]

Wiki: industrial_robot_client (last edited 2018-03-23 13:57:11 by GvdHoorn)