Gazebo Engine Configuration

Here you can find the experiment configuration file parameters description and schema for the Gazebo Engine.

Engine Configuration Parameters

This Engine type parameters are defined in GazeboGRPCEngine schema (listed here), which in turn is based on EngineBase and EngineGRPC schemas and thus inherits all parameters from them.

To use the Gazebo engine in an experiment, set EngineType to “gazebo_grpc”.

Name

Description

Type

Default

Required

Array

EngineName

Name of the engine

string

X

EngineType

Engine type. Used by

string

X

EngineProcCmd

Engine Process Launch command

string

EngineProcStartParams

Engine Process Start Parameters

string

[]

X

EngineEnvParams

Engine Process Environment Parameters

string

[]

X

EngineLaunchCommand

object

{“LaunchType”:”BasicFork”}

EngineTimestep

Engine Timestep in seconds

number

0.01

EngineCommandTimeout

Engine Timeout (in seconds). It tells how long to wait for the completion of the engine runStep. 0 or negative values are interpreted as no timeout

number

0.0

  • Parameters inherited from the EngineGRPC schema:

Name

Description

Type

Default

Required

Array

ServerAddress

gRPC Server address. Should this address already be in use, simulation initialization will fail

string

localhost:9004

  • Parameters specific to this engine type:

Name

Description

Type

Default

Required

Array

GazeboWorldFile

Path to Gazebo SDF World file

string

X

GazeboSDFModels

Additional models to be spawn in the Gazebo simulation. The elements of this array should be of type

[]

X

GazeboPlugins

Additional system plugins that should be loaded on startup

string

[]

X

GazeboRNGSeed

Seed parameters passed to gzserver start command

integer

0

WorldLoadTime

Maximum time (in seconds) to wait for the NRPCommunicationPlugin to load the world sdf file. 0 means it will wait indefinitely

integer

20

  • Parameters of GazeboSDFModel:

Name

Description

Type

Default

Required

Array

Name

Name of the model

string

X

File

Path to Gazebo SDF file describing the model

string

X

InitPose

Array of six elements describing the model initial pose as a space separated 6-tuple: x y z roll pitch yaw

string

“0 0 0 0 0 0”

Schema

As explained above, the schema used by the Gazebo engine inherits from EngineBase and EngineGRPC schemas. A complete schema for the configuration of this engine is given below:

{ "gazebo_sdf_model" : {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Gazebo SDF Model",
    "description": "Additional gazebo models to be spawn in a gazebo simulation",
    "$id": "#GazeboSDFModel",
    "properties" : {
      "Name": {
        "type": "string",
        "description": "Name of the model"
      },
      "File": {
        "type": "string",
        "description": "Path to Gazebo SDF file describing the model"
      },
      "InitPose": {
        "type": "string",
        "description": "Array of six elements describing the model initial pose as a space separated 6-tuple: x y z roll pitch yaw.",
        "default": "0 0 0 0 0 0"
      }
    },
    "required": ["Name", "File"]
  },
  "engine_gazebo_base" : {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Gazebo Base",
    "description": "Gazebo Base Engine configuration schema. Configuration for all gazebo engine implementations inherit from this one",
    "$id": "#GazeboBase",
    "properties" : {
      "GazeboWorldFile": {
        "type": "string",
        "description": "Path to Gazebo SDF World file"
      },
      "GazeboSDFModels": {
        "type": "array",
        "items": {"$ref": "#/gazebo_sdf_model"},
        "description": "Additional models to be spawn in the Gazebo simulation"
      },
      "GazeboPlugins": {
        "type": "array",
        "items": {"type": "string"},
        "description": "Additional system plugins that should be loaded on startup"
      },
      "GazeboRNGSeed": {
        "type": "integer",
        "default": 0,
        "description": "Seed parameters passed to gzserver start command"
      },
      "WorldLoadTime": {
        "type": "integer",
        "default": 20,
        "description": "Maximum time (in seconds) to wait for the NRPCommunicatioPlugin to load the world sdf file. 0 means it will wait indefinitely"
      }
    },
    "required": ["GazeboWorldFile"]
  },
  "engine_gazebo_grpc" : {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Gazebo Grpc Engine",
    "description": "Gazebo Grpc Engine",
    "$id": "#GazeboGRPCEngine",
    "allOf": [
      { "$ref": "json://nrp-core/engines/engine_comm_protocols.json#/engine_grpc" },
      { "$ref": "#/engine_gazebo_base" },
      {
        "properties": {
          "EngineType": { "enum": ["gazebo_grpc"] },
          "EngineProcCmd": { "default": "/usr/bin/gzserver" },
          "ProtobufPackages": { "default": ["Gazebo"]}
        }
      }
    ]
  },
  "engine_gazebo_json" : {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Gazebo Json Engine",
    "description": "Gazebo Json Engine",
    "$id": "#GazeboJSONEngine",
    "allOf": [
      { "$ref": "json://nrp-core/engines/engine_comm_protocols.json#/engine_json" },
      { "$ref": "#/engine_gazebo_base" },
      {
        "properties": {
          "EngineType": { "enum": ["gazebo_json"] },
          "EngineProcCmd": { "default": "/usr/bin/gzserver" }
        }
      }
    ]
  }
}