Show EOL distros: 

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

Package Summary

simple_message defines a simple messaging connection and protocol for communicating with an industrial robot controller. Additional handler and manager classes are included for handling connection limited systems. This package is part of the ROS-Industrial program.

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

Package Summary

simple_message defines a simple messaging connection and protocol for communicating with an industrial robot controller. Additional handler and manager classes are included for handling connection limited systems. This package is part of the ROS-Industrial program.

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

Package Summary

simple_message defines a simple messaging connection and protocol for communicating with an industrial robot controller. Additional handler and manager classes are included for handling connection limited systems. This package is part of the ROS-Industrial program.

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

Package Summary

simple_message defines a simple messaging connection and protocol for communicating with an industrial robot controller. Additional handler and manager classes are included for handling connection limited systems. This package is part of the ROS-Industrial program.

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

Package Summary

simple_message defines a simple messaging connection and protocol for communicating with an industrial robot controller. Additional handler and manager classes are included for handling connection limited systems. This package is part of the ROS-Industrial program.

Protocol

The Simple Message (SimpleMessage) protocol defines the message structure between the ROS driver layer and the robot controller itself. The protocol meets the following requirements:

  1. Format should be simple enough that code can be shared between ROS and the controller (for those controllers that support C/C++). For those controllers that do not support C/C++, the protocol must be simple enough to be decoded with the limited capabilities of the typical robot programming language. A corollary to this requirement is that the protocol should not be so onerous as to overwhelm the limited resources of the robot controller.
  2. Format should allow for data streaming (ROS topic like)
  3. Format should allow for data reply (ROS service like)
  4. The protocol is not intended to encapsulate version information. It is up to individual developers to ensure that code developed for communicating platforms does not have any version conflicts (this includes message type identifiers).

Message Structure

  • PREFIX (not considered part of the message)
    • int LENGTH (HEADER + DATA) in bytes
  • HEADER
    • int MSG_TYPE identifies type of message (standard and robot specific values)
    • int COMM_TYPE identified communications type
    • int REPLY CODE reply code (only valid in service replies)
  • BODY
    • ByteArray DATA variable length data determined by message type and and communications type.

See ROS-Industrial REP-0004 for documentation on officially assigned message identifiers to be used for the MSG_TYPE field.

Typed Messages

The message protocol allows for an arbitrary data payload for message and communications types. However, the client/server model requires that both understand the data payload associated with the different message and communications types. The typed message class enforces the data payload structure. The typed message base class provides methods for creating topic, reply, and request messages. If used in both the client and server, the developer need not understand the structure of the data payload. Unfortunately, a typical robot controller cannot use C++ classes, and thus the developer must understand the message protocol and payload data structure in order to parse it on the robot controller side. The documentation on message specific structures can be found in the source header files. For convenience the message structure is also shown here for common message types. For a more detailed example of a typed message structure and how it is used see the following tutorial.

Joint Message

This message represents the joint position data. NOTE: In earlier versions this was simply referred to as JOINT message. This caused confusion as there are many types of joint messages (position, velocity, feedback). To remove confusion, this message was changed to JOINT_POSITION. Other types of messages will have to be created for velocity and other feedback.

Member

Type

Value

Size

Message Type:

StandardMsgType::JOINT_POSITION

10

4 bytes

Communications Type:

CommType

ANY

4 bytes

Reply Type:

ReplyType

ANY

4 bytes

Data (Topic, Requests, & Response)

sequence

shared_int

ANY

4 bytes

joints

shared_real[10]

ANY

40 bytes

Joint Trajectory Point Message

The point data serves as a waypoint along a trajectory and is meant to mirror the trajectory_msgs/JointTrajectoryPoint message. This point differs from the ROS trajectory point in the following ways:

  • The joint velocity in an industrial robot standard way (as a single value).
  • The duration is somewhat different than the ROS timestamp. The timestamp specifies when the move should start, where as the duration is how long the move should take. A big assumption is that a sequence of points is continuously executed. This is generally true of a ROS trajectory but not required.

Member

Type

Value

Size

Message Type:

StandardMsgType::JOINT_TRAJ_PT

11

4 bytes

Communications Type:

CommType

ANY

4 bytes

Reply Type:

ReplyType

ANY

4 bytes

Data(Topic & Requests, Response data are empty)

sequence

shared_int

ANY

4 bytes

joints

shared_real[10]

ANY

40 bytes

velocity

shared_real

ANY

4 bytes

duration

shared_real

ANY

4 bytes

Generic Connections

The simple message utilizes a abstract connection (SmplMsgConnection) interface to send messages to the industrial robot controller. The interface makes two assumptions:

  1. The connection is capable of sending raw bytes
  2. The data connection has an explicit connect that establishes the connection (and an associated disconnect method). NOTE: For data connections that are connectionless, such as UDP, the connection method can be a NULL operation.

TCP socket connections have been wrapped for in the connection interface. This is the recommended connection type.

Connection Manager and Message Handlers

The Message Manager and Handler (MessageManager and MessageHandler) classes can be used to manage a connection that allows for multiple message types to be handled. The message manager contains a list of message handlers and executed the appropriate handler when a message is received. These classes are particularly useful on robot controllers which may have a limited number of connections available to them.

Byte Ordering

New in Trunk(Fuerte)/Groovy

The default library built by the simple_message package does not include any byte swapping. The inherent assumption is that the client and server have the same byte order. For some systems this is not true, and the server implementation is not capable of performing the byte swapping itself. For these systems, the simple message package has a byte swapped implementation that should be linked against. These two libraries should cover the issues related to byte order. NOTE: Float values are assumed to have the same representation. The default representation on intel based machines is IEEE 754.

Library Linking

New in Trunk(Fuerte)/Groovy

The simple message library compiles several library versions. Packages that link against the simple message package must specify which library to link to using the target_link_libraries macro in CMakeList.txt as follows:

rosbuild_add_executable(my_exe my_exe.cpp)
target_link_libraries(my_exe simple_message)
OR
target_link_libraries(my_exe simple_message_bswap)

Wireshark Protocol Dissector

A Lua Wireshark dissector plugin for the simple message protocol is available from ros-industrial/packet-simplemessage at GitHub. See the readme for information on how to install it.

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: simple_message (last edited 2018-03-23 13:56:26 by GvdHoorn)