1. Home
  2. Docs
  3. Yonohub
  4. YonoArc
  5. YonoArc Messages

YonoArc Messages

YonoArc blocks exchange messages whose data structures are well defined in advance. Any slight difference between the definition of two messages will prevent two blocks from exchanging data on the shared connection. YonoArc gives everyone the freedom to define their own messages or to use the available messages. YonoArc follows the simple message description language used by ROS. For example, the following message contains two integers:

int32 x
int32 y

Messages are grouped into packages. When creating a block, the developer has to specify the list of packages the block needs. Packages have to be maintained in Git repositories in order to facilitate the versioning process. YonoArc provides some public repositories for common messages:

  1. yonoarc_msgs will grow to include the most common messages used by the blocks published on YonoStore. This package currently includes these messages. All messages have a header (defined in std_msgs below) containing a timestamp that is used for time synchronization, except messages ending with underscore (e.g., Label_) because they are used in the definition of other messages. If you wish to add more messages to yonoarc_msgs, please create an issue at support.yonohub.com.
  2. ROS std_msgs contains minimal messages of primitive data types and multi-arrays in ROS. It is intended for quick prototyping, not production use. Source: http://wiki.ros.org/std_msgs
  3. ROS common_msgs contains multiple packages of commonly used messages in ROS. It includes multiple packages: actions (actionlib_msgs), diagnostics (diagnostic_msgs), geometric primitives (geometry_msgs), robot navigation (nav_msgs), and common sensors (sensor_msgs). Source: http://wiki.ros.org/common_msgs

Creating Custom Messages

To create your own custom messages:

  1. Navigate to gitlab.yonohub.com by clicking its icon on the main view.
  2. Create a repository for your new package.
  3. The contents of your repository should be similar to yonoarc-msgs:
    • yonoarc_msgs is the folder of the ROS package for the messages. For more information about ROS packages, please check this link.
      • msg is the folder containing all the message files.
        • VehicleControl.msg is a file describing a single message according to the ROS message description language. The full name of this message, for example, is yonoarc_msgs/VehicleControl where yonoarc_msgs is the name of the package and VehicleControl is the name of the message file.
      • package.xml is an XML file holding information about the package.
      • CMakeLists.txt contains the names of the message files.
  4. It is important to tag your repository to indicate its version (e.g., 0.1.0) so that it is easy to track which blocks are using which versions of messages in order to avoid conflicts.
  5. Use the URL of your newly created package (e.g., https://gitlab.yonohub.com/YonoTeam/yonoarc-msgs.git) and its version (e.g., 0.1.0) while creating a custom block in YonoArc or a project in the Block Manager.