.. index:: pair: page; NRP Connectors Schema .. _doxid-nrp_connectors_schema: 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 :ref:`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 :ref:`there ` for more details. Supported middlewares are ROS and MQTT: .. _doxid-nrp_connectors_schema_1ros_connector_schema_parameters: ROSNode Parameters ~~~~~~~~~~~~~~~~~~ ======== ==================== ====== ======== ======== ===== Name Description Type Default Required Array ======== ==================== ====== ======== ======== ===== NodeName Name of the ROS node string nrp_core ======== ==================== ====== ======== ======== ===== .. _doxid-nrp_connectors_schema_1mqtt_connector_schema_parameters: MQTTClient Parameters ~~~~~~~~~~~~~~~~~~~~~ ========== =================== ====== =============== ======== ===== Name Description Type Default Required Array ========== =================== ====== =============== ======== ===== MQTTBroker MQTT Broker address string localhost:1883 ClientName MQTT client name string NRP-core-client ========== =================== ====== =============== ======== ===== .. _doxid-nrp_connectors_schema_1nrp_connectors_schema_example: Example ~~~~~~~ Below is listed an example experiment configuration connecting to both ROS and MQTT. .. ref-code-block:: cpp { "SimulationName": "test_sim", "SimulationDescription": "Just connecting to ROS and MQTT", "SimulationTimeout": 1, "MQTTNode": {"ClientName": "myMQTTclient"}, "ROSNode": {"NodeName": "myROSnode"} } .. _doxid-nrp_connectors_schema_1nrp_connectors_schema_schema: Schema ~~~~~~ .. ref-code-block:: cpp { "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" } } } }