Roboy Communication Standard

Roboy Communication Standard is a proposal on decorating standard ros messages with JSON-like payload.

Create Queries Payload Message

Creating a node:

{
    'label': 'some_label',
    'faceVector': [float, ..., float] // Under comsideration, OPTIONAL
    'properties': {
        'prop_a': 'value_a',
        'prop_b': 'value_b'
    }
}

This query requests creating node with label - some_label, prop_a having value_a and prop_b - value_b. The faceVector contains face features for the node with specified label Person (applicable only to nodes of this label).

There the label may be:

  • Person

  • Robot

  • Organization

    1. Company
    2. University
  • Location

    1. City
    2. Country
    3. Continent
  • Hobby

  • Type

  • Occupation

  • Object (which Roboy can detect/interact with)

Properties other than ‘name’ are not required on the creation and may be omitted. Later the node’s properties may be updated by an update query. The query returns the ID of the created node on success. The faceVector is fed into Redis if present. The named properties and allowed values may be found in Neo4j Memory Architecture.

Update Queries Payload Message

Updating a node

{
    'id': 1, //REQUIRED, contains node id

    'relationships':  {
        'rel_a': [2, 3],
        'rel_b': [3]
    }

    'properties': {
        'prop_a': 'value_a',
        'prop_b': 'value_b'
    }
}

This query requests updating node with ID - 1. This query requests creating relationships between two nodes, where the relationships

are e.g. rel_a, the number denotes the ID of the node to where the relationships is following from the current node.

This query requests creating (changing) properties of the node, where the properties may be e.g. prop_a with value value_a.

Warning

You should be aware of the node label.

The query returns the OK message on success. The named properties and allowed values may be found in Neo4j Memory Architecture.

Get Queries Payload Message

Get nodes IDs

{
    'label': 'some_label',

    'relationships': {
        'rel_a': [2],
        'rel_b': [3]
    },

    'properties': {
        'prop_a': 'value'
    }
}

This query requests getting all nodes which have node label - some_label, have relationships rel_a with the node having ID 2 and rel_b with the node of ID 3, as well as having prop_a equal to value. The query returns an array of node IDs on success (may be an empty array if no such nodes exist). The allowed relationships types for each pair of nodes and named properties of nodes may be found in Neo4j Memory Architecture.

Get node by ID

{
    'id': 1
}

This query requests getting all information about a node with respective ID. The query returns a JSON containing all information about the node on success (may be an empty string if no such node exist).

Warning

You should be aware of the node label.

The respective information about what could be returned may be found in Neo4j Memory Architecture.

Remove Queries Payload Message

Remove properties and relationships of the nodes

{
    'id': 1,

    'relationships': {
        'rel_a': [2],
        'rel_b': [3]
    },

    'properties': {
        'prop_a'
    }
}

This query requests removing all respective properties and relationships with regard to the node with ID = 1: relationships rel_a with the node having ID = 2 and rel_b with the node having ID = 3, as well as property prop_a.

Warning

You should be aware of the node label.

The query returns the OK message on success. The named properties and allowed values may be found in Neo4j Memory Architecture.