Noisy-Object-Sensor Component¶
The noisy_object_sensor component plugin applies noise to object data.
Triggers¶
Todo
Describe the triggers noisy_object_sensor makes available.
Examples¶
The optional/vtd/tests/test_vtd_smoketest.json test makes use of this plugin. First, the
plugin is defined in optional/vtd/tests/config_vtd_infinite.json:
{
"version": "4",
"include": [
"controller_virtue.json",
"controller_basic.json"
],
"defaults": {
"simulators": [
{
"binding": "vtd",
"args": {
"label_vehicle": "symbol"
}
}
],
"controllers": [
{
"binding": "virtue",
"args": {
"lane_sensor_components": ["cloe::default_lane_sensor"]
}
}
]
},
"simulators": [
{
"binding": "vtd",
"args": {
"rdb_params": {
"retry_delay_s": 1.0
},
"scenario": "acc.xml",
"setup": "Cloe.noGUInoIG",
"image_generator": false,
"vehicles": {
"Ego": {
"components": {
"cloe::default_lane_sensor": {
"from": "camera",
"type": "lane_sensor",
"override": true
},
"cloe::default_world_sensor": {
"from": "front_radar",
"type": "object_sensor",
"override": true
},
"sysut::video_objects": {
"from": "camera",
"type": "object_sensor"
},
"sysut::front_radar_objects": {
"from": "front_radar",
"type": "object_sensor"
},
"sysut::rear_radar_objects": {
"from": "rear_radar",
"type": "object_sensor"
}
},
"sensors": {
"camera": {
"xml": "<Sensor name='Sensor_[[ sensor_id ]]_[[ sensor_name ]]' type='video'><Load lib='libModulePerfectSensor.so' path='' persistent='true'/><Frustum near='0.0' far='80.0' left='45.0' right='45.0' bottom='45.0' top='45.0'/><Origin type='sensor'/><Cull maxObjects='50' enable='true'/><Port name='RDBout' number='[[ sensor_port ]]' type='TCP' sendEgo='false'/><Player id=\"[[ player_id ]]\"/><Position dx='2.0' dy='0.0' dz='1.5' dhDeg='0.0' dpDeg='0.0' drDeg='0.0'/><Database resolveRepeatedObjects='true' continuousObjectTesselation='2.0'/><Filter objectType='pedestrian'/><Filter objectType='vehicle'/><Filter objectType='trafficSign'/><Filter objectType='obstacle'/><Filter objectType=\"roadMarks\" roadmarkPreviewDistance=\"100.0\" tesselate=\"true\" tesselateNoPoints=\"10\" tesselateFixedStep=\"true\"/><Debug enable='false' detection='false' road='false' position='true' dimensions='false' camera='false' CSV='false' packages='false' culling='true' contactPoints='false' trafficSigns='false'/></Sensor>"
},
"front_radar": {
"xml": "<Sensor name='Sensor_[[ sensor_id ]]_[[ sensor_name ]]' type='video'><Load lib='libModulePerfectSensor.so' path='' persistent='true'/><Frustum near='0.0' far='180.0' left='20.0' right='20.0' bottom='20.0' top='20.0'/><Origin type='sensor'/><Cull maxObjects='50' enable='true'/><Port name='RDBout' number='[[ sensor_port ]]' type='TCP' sendEgo='false'/><Player id=\"[[ player_id ]]\"/><Position dx='0.0' dy='0.0' dz='0.0' dhDeg='0.0' dpDeg='0.0' drDeg='0.0'/><Database resolveRepeatedObjects='true' continuousObjectTesselation='2.0'/><Filter objectType='pedestrian'/><Filter objectType='vehicle'/><Filter objectType='trafficSign'/><Filter objectType='obstacle'/><Debug enable='false' detection='false' road='false' position='true' dimensions='false' camera='false' CSV='false' packages='false' culling='true' contactPoints='false' trafficSigns='false'/></Sensor>"
},
"rear_radar": {
"xml": "<Sensor name='Sensor_[[ sensor_id ]]_[[ sensor_name ]]' type='video'><Load lib='libModulePerfectSensor.so' path='' persistent='true'/><Frustum near='0.0' far='180.0' left='20.0' right='20.0' bottom='20.0' top='20.0'/><Origin type='sensor'/><Cull maxObjects='50' enable='true'/><Port name='RDBout' number='[[ sensor_port ]]' type='TCP' sendEgo='false'/><Player id=\"[[ player_id ]]\"/><Position dx='-1.0' dy='0.0' dz='0.5' dhDeg='180.0' dpDeg='0.0' drDeg='0.0'/><Database resolveRepeatedObjects='true' continuousObjectTesselation='2.0'/><Filter objectType='pedestrian'/><Filter objectType='vehicle'/><Filter objectType='trafficSign'/><Filter objectType='obstacle'/><Debug enable='false' detection='false' road='false' position='true' dimensions='false' camera='false' CSV='false' packages='false' culling='true' contactPoints='false' trafficSigns='false'/></Sensor>"
}
}
}
}
}
}
],
"vehicles": [
{
"name": "default",
"from": {
"simulator": "vtd",
"index": 0
},
"components": {
"cloe::speedometer": {
"binding": "speedometer",
"name": "default_speed",
"from": "cloe::gndtruth_ego_sensor"
},
"cloe::default_world_sensor": {
"binding": "noisy_object_sensor",
"name": "noisy_object_sensor",
"from": "cloe::default_world_sensor",
"args": {
"enable": false,
"noise": [
{
"target": "translation",
"distribution": {
"binding": "normal",
"mean": 0.0,
"std_deviation": 0.3
}
}
]
}
},
"cloe::default_lane_sensor": {
"binding": "noisy_lane_sensor",
"name": "noisy_lane_sensor",
"from": "cloe::default_lane_sensor",
"args": {
"enable": true,
"noise": [
{
"target": "dy_start",
"distribution": {
"binding": "normal",
"mean": 0.0,
"std_deviation": 0.1
}
},
{
"target": "dx_end",
"distribution": {
"binding": "normal",
"mean": 0.0,
"std_deviation": 5.0
}
}
]
}
}
}
}
],
"logging": [
{
"name": "cloe/vtd/signs",
"level": "error"
}
]
}
Then it is activated in optional/vtd/tests/test_vtd_smoketest.json
{
"version": "4",
"include": [
"bootstrap_vtd.json",
"config_vtd_smoketest.json"
]
}
Defaults¶
The following help can be viewed with cloe-engine usage noisy_object_sensor:
Name: noisy_object_sensor
Type: component
Path: ~/.conan/data/cloe-plugin-noisy-sensor/0.24.0/cloe/develop/package/b604e04f9a20730e6de510c8305e28e783869866/lib/cloe/component_noisy_object_sensor.so
Usage: {
"enable": "boolean :: enable or disable component",
"noise": "array of object :: configure noisy parameters",
"reuse_seed": "boolean :: whether to get a new seed on reset",
"seed": "integer :: set random engine seed (effective on reset)"
}
Defaults: {
"enable": true,
"noise": [],
"reuse_seed": true,
"seed": 0
}
JSON Schema¶
The following can be viewed with cloe-engine usage --json noisy_object_sensor:
{
"$id": "~/.conan/data/cloe-plugin-noisy-sensor/0.24.0/cloe/develop/package/b604e04f9a20730e6de510c8305e28e783869866/lib/cloe/component_noisy_object_sensor.so",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"description": "add gaussian noise to object sensor output",
"properties": {
"enable": {
"description": "enable or disable component",
"type": "boolean"
},
"noise": {
"description": "configure noisy parameters",
"items": {
"additionalProperties": false,
"properties": {
"distribution": {
"description": "set distribution binding and arguments",
"oneOf": [
{
"additionalProperties": false,
"properties": {
"binding": {
"const": "normal",
"description": "name of factory"
},
"mean": {
"description": "mean value of normal distribution",
"maximum": 1.7976931348623157e+308,
"minimum": -1.7976931348623157e+308,
"type": "number"
},
"std_deviation": {
"description": "standard deviation of normal distribution",
"maximum": 1.7976931348623157e+308,
"minimum": -1.7976931348623157e+308,
"type": "number"
}
},
"required": [
"binding"
],
"type": "object"
}
]
},
"target": {
"description": "data field of the object the noise should be applied to",
"enum": [
"translation",
"velocity",
"acceleration"
],
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"reuse_seed": {
"description": "whether to get a new seed on reset",
"type": "boolean"
},
"seed": {
"description": "set random engine seed (effective on reset)",
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
}
},
"title": "noisy_object_sensor",
"type": "object"
}