NRP Connectors Schema

This schema is a collection of sub-schemas defining configuration parameters for the possible connections to external middlewares that can be established by NRPCoreSim.

When one of these sub-schemas is present in the Simulation Schema, NRPCore will attempt to connect to the corresponding middleware using the given parameters. For each of these sub-schemas there is a corresponding parameter in the Simulation Schema, check there for more details.

Supported middlewares are ROS and MQTT:

ROSNode Parameters

Name

Description

Type

Default

Required

Array

NodeName

Name of the ROS node

string

nrp_core

MQTTClient Parameters

Name

Description

Type

Default

Required

Array

MQTTBroker

MQTT Broker address

string

localhost:1883

ClientName

MQTT client name

string

NRP-core-client

Example

Below is listed an example experiment configuration connecting to both ROS and MQTT.

{
    "SimulationName": "test_sim",
    "SimulationDescription": "Just connecting to ROS and MQTT",
    "SimulationTimeout": 1,
    "MQTTNode": {"ClientName": "myMQTTclient"},
    "ROSNode": {"NodeName": "myROSnode"}
}

Schema

{
  "MQTTClient": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "MQTT Client",
    "description": "MQTT Client configuration properties",
    "$id": "#MQTTClient",
    "type": "object",
    "properties" : {
      "MQTTBroker" : {
        "type" : "string",
        "description": "MQTT Broker address",
        "default" : "localhost:1883"
      },
      "ClientName" : {
        "type" : "string",
        "description": "MQTT client name",
        "default" : "NRP-core-client"
      }
    }
  },
  "ROSNode": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "ROS Node",
    "description": "ROS Node configuration parameter",
    "$id": "#ROSNode",
    "type": "object",
    "properties" : {
      "NodeName" : {
        "type" : "string",
        "description": "Name of the ROS node",
        "default" : "nrp_core"
      }
    }
  }
}