NRP Core  1.4.1
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".

NameDescriptionTypeDefaultRequiredArray
EngineNameName of the enginestringX
EngineTypeEngine type. Used by EngineLauncherManager to select the correct engine launcherstringX
EngineProcCmdEngine Process Launch commandstring
EngineProcStartParamsEngine Process Start Parametersstring[]X
EngineEnvParamsEngine Process Environment Parametersstring[]X
EngineLaunchCommandLaunchCommand with parameters that will be used to launch the engine processobject{"LaunchType":"BasicFork"}
EngineTimestepEngine Timestep in secondsnumber0.01
EngineCommandTimeoutEngine Timeout (in seconds). It tells how long to wait for the completion of the engine runStep. 0 or negative values are interpreted as no timeoutnumber0.0
  • Parameters inherited from the EngineGRPC schema:
NameDescriptionTypeDefaultRequiredArray
ServerAddressgRPC Server address. Should this address already be in use, simulation initialization will failstringlocalhost:9004
  • Parameters specific to this engine type:
NameDescriptionTypeDefaultRequiredArray
GazeboWorldFilePath to Gazebo SDF World filestringX
GazeboSDFModelsAdditional models to be spawn in the Gazebo simulation. The elements of this array should be of type GazeboSDFModel, described belowGazeboSDFModel[]X
GazeboPluginsAdditional system plugins that should be loaded on startupstring[]X
GazeboRNGSeedSeed parameters passed to gzserver start commandinteger0
WorldLoadTimeMaximum time (in seconds) to wait for the NRPCommunicationPlugin to load the world sdf file. 0 means it will wait indefinitelyinteger20

  • Parameters of GazeboSDFModel:
NameDescriptionTypeDefaultRequiredArray
NameName of the modelstringX
FilePath to Gazebo SDF file describing the modelstringX
InitPoseArray of six elements describing the model initial pose as a space separated 6-tuple: x y z roll pitch yawstring"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" }
}
}
]
}
}