Scenario#
Behavior sampler#
Sampler of behaviors, replaces types in Behavior with samplers of the same type.
$id: http://navground/behavior_sampler
$ref: behavior_sampler_register
$schema: https://json-schema.org/draft/2020-12/schema
properties:
heading:
$defs:
of:
$dynamicAnchor: T
enum:
- target_point
- target_angle
- target_angular_speed
- velocity
- idle
$id: heading
$ref: sampler
horizon:
$defs:
of:
$dynamicAnchor: T
minimum: 0
type: number
$id: horizon
$ref: number_sampler
modulations:
items:
$ref: behavior_modulation_sampler
type: array
optimal_angular_speed:
$defs:
of:
$dynamicAnchor: T
minimum: 0
type: number
$id: optimal_angular_speed
$ref: number_sampler
optimal_speed:
$defs:
of:
$dynamicAnchor: T
minimum: 0
type: number
$id: optimal_speed
$ref: number_sampler
path_look_ahead:
$defs:
of:
$dynamicAnchor: T
minimum: 0
type: number
$id: path_look_ahead
$ref: number_sampler
path_tau:
$defs:
of:
$dynamicAnchor: T
minimum: 0
type: number
$id: path_tau
$ref: number_sampler
rotation_tau:
$defs:
of:
$dynamicAnchor: T
minimum: 0
type: number
$id: rotation_tau
$ref: number_sampler
safety_margin:
$defs:
of:
$dynamicAnchor: T
minimum: 0
type: number
$id: safety_margin
$ref: number_sampler
type:
type: string
type: object
unevaluatedProperties: false
Behavior modulation sampler#
Sampler of behavior modulations, replaces types in Behavior Modulation with samplers of the same type.
$id: http://navground/behavior_modulation_sampler
$ref: behavior_modulation_sampler_register
$schema: https://json-schema.org/draft/2020-12/schema
properties:
enabled:
$defs:
of:
$dynamicAnchor: T
type: boolean
$id: enabled
$ref: sampler
type:
type: string
type: object
unevaluatedProperties: false
Kinematics sampler#
Sampler of kinematics, replaces types in Kinematics with samplers of the same type.
$id: http://navground/kinematics_sampler
$ref: kinematics_sampler_register
$schema: https://json-schema.org/draft/2020-12/schema
properties:
max_angular_speed:
$defs:
of:
$dynamicAnchor: T
type: number
$id: max_angular_speed
$ref: number_sampler
max_speed:
$defs:
of:
$dynamicAnchor: T
type: number
$id: max_speed
$ref: number_sampler
type:
type: string
type: object
unevaluatedProperties: false
State estimation sampler#
Sampler of state estimations, replaces types in State estimation with samplers of the same type.
$id: http://navground/state_estimation_sampler
$ref: state_estimation_sampler_register
$schema: https://json-schema.org/draft/2020-12/schema
type: object
unevaluatedProperties: false
Task sampler#
Sampler of tasks, replaces types in Task with samplers of the same type.
$id: http://navground/task_sampler
$ref: task_sampler_register
$schema: https://json-schema.org/draft/2020-12/schema
type: object
unevaluatedProperties: false
Group#
Sampler of agents: similar to Agent but uses the sampler schemas to populate the agent components.
$id: http://navground/group
$schema: https://json-schema.org/draft/2020-12/schema
additionalProperties: false
properties:
behavior:
$ref: behavior_sampler
color:
$defs:
of:
$dynamicAnchor: T
items:
type: string
type: array
$id: color
$ref: sampler
control_period:
$defs:
of:
$dynamicAnchor: T
minimum: 0
type: number
$id: control_period
$ref: number_sampler
id:
$defs:
of:
$dynamicAnchor: T
minimum: 0
type: integer
$id: id
$ref: number_sampler
kinematics:
$ref: kinematics_sampler
name:
$defs:
of:
$dynamicAnchor: T
type: string
$id: name
$ref: sampler
number:
$defs:
of:
$dynamicAnchor: T
minimum: 0
type: integer
$id: number
$ref: number_sampler
orientation:
$defs:
of:
$dynamicAnchor: T
type: number
$id: orientation
$ref: number_sampler
position:
$defs:
of:
$dynamicAnchor: T
$ref: vector2
$id: position
$ref: vector_sampler
radius:
$defs:
of:
$dynamicAnchor: T
minimum: 0
type: number
$id: radius
$ref: number_sampler
speed_tolerance:
$defs:
of:
$dynamicAnchor: T
minimum: 0
type: number
$id: speed_tolerance
$ref: number_sampler
state_estimation:
$ref: state_estimation_sampler
tags:
$defs:
of:
$dynamicAnchor: T
type: string
$id: tags
$ref: sampler
task:
$ref: task_sampler
type:
$defs:
of:
$dynamicAnchor: T
type: string
$id: type
$ref: sampler
type: object
Note
Almost all fields in these schemas are samplers with the exception of the type
field of registered components, which is a scalar string.
Example#
type: my_agent_type
name: my_group
number: 4
kinematics:
type: Omni
# implicit constant
max_speed: 1.0
behavior:
type: HL
safety_margin:
# explicit constant
sampler: constant
value: 0.5
# implicit sequence
tau: [0.1, 0.2, 0.2, 0.1]
state_estimation:
type: Bounded
# explicit sequence
range:
sampler: sequence
value: [0.5, 1.0, 1.5, 2.0]
# regular
radius:
sampler: regular
from: 0.1
to: 0.5
number: 4
# grid
position:
sampler: regular
from: [0, 0]
to: [10, 10]
number: [2, 2]
# step
orientation:
sampler: regular
from: 0
step: 0.1
control_step:
# uniform random
sampler: uniform
from: 0.1
to: 0.2
Scenario#
Scenarios are generators of worlds: similar to World but using Group instead of a list of agent_yaml.
$id: http://navground/scenario
$ref: scenario_register
$schema: https://json-schema.org/draft/2020-12/schema
properties:
bounding_box:
$ref: bounding_box
groups:
items:
$ref: group
type: array
obstacles:
items:
$ref: obstacle
type: array
walls:
items:
$ref: wall
type: array
type: object
unevaluatedProperties: false
Example#
walls:
- line: [[-1.0, -1.0], [-1.0, 1.0]]
obstacles:
-
position: [2.0, 0.0]
radius: 0.5
groups:
- type: my_type
number: 2
kinematics:
type: Omni
max_speed: 1.0
behavior:
type: Dummy
radius: 0.1
control_period: 0.1
Register#
Like all the other components, scenarios have a schema that includes all registered sub-classes:
$id: http://navground/scenario_register
$schema: https://json-schema.org/draft/2020-12/schema
anyOf:
- properties:
orientation_noise:
$defs:
of:
$dynamicAnchor: T
default: 0
description: Noise added to the initial orientation
minimum: 0
type: number
$id: orientation_noise
$ref: number_sampler
position_noise:
$defs:
of:
$dynamicAnchor: T
default: 0
description: Noise added to the initial position
minimum: 0
type: number
$id: position_noise
$ref: number_sampler
radius:
$defs:
of:
$dynamicAnchor: T
default: 1
description: Radius of the circle
minimum: 0
type: number
$id: radius
$ref: number_sampler
shuffle:
$defs:
of:
$dynamicAnchor: T
default: 0
description: Whether to shuffle the agents before initializing them
type: number
$id: shuffle
$ref: number_sampler
tolerance:
$defs:
of:
$dynamicAnchor: T
default: 0.100000001
description: Goal tolerance
exclusiveMinimum: 0
type: number
$id: tolerance
$ref: number_sampler
type:
const: Antipodal
- properties:
add_safety_to_agent_margin:
$defs:
of:
$dynamicAnchor: T
default: true
description: Whether to add the safety margin to the agent margin
type: boolean
$id: add_safety_to_agent_margin
$ref: sampler
agent_margin:
$defs:
of:
$dynamicAnchor: T
default: 0.100000001
description: initial minimal distance between agents
minimum: 0
type: number
$id: agent_margin
$ref: number_sampler
length:
$defs:
of:
$dynamicAnchor: T
default: 10
description: Corridor length
exclusiveMinimum: 0
type: number
$id: length
$ref: number_sampler
type:
const: Corridor
width:
$defs:
of:
$dynamicAnchor: T
default: 1
description: Corridor width
exclusiveMinimum: 0
type: number
$id: width
$ref: number_sampler
- properties:
add_safety_to_agent_margin:
$defs:
of:
$dynamicAnchor: T
default: true
description: Whether to add the safety margin to the agent margin
type: boolean
$id: add_safety_to_agent_margin
$ref: sampler
agent_margin:
$defs:
of:
$dynamicAnchor: T
default: 0.100000001
description: initial minimal distance between agents
minimum: 0
type: number
$id: agent_margin
$ref: number_sampler
side:
$defs:
of:
$dynamicAnchor: T
default: 2
description: Distance between targets
exclusiveMinimum: 0
type: number
$id: side
$ref: number_sampler
target_margin:
$defs:
of:
$dynamicAnchor: T
default: 0.5
description: Initial minimal distance between agents and targets
minimum: 0
type: number
$id: target_margin
$ref: number_sampler
tolerance:
$defs:
of:
$dynamicAnchor: T
default: 0.25
description: Goal tolerance
exclusiveMinimum: 0
type: number
$id: tolerance
$ref: number_sampler
type:
const: Cross
- properties:
add_safety_to_agent_margin:
$defs:
of:
$dynamicAnchor: T
default: true
description: Whether to add the safety margin to the agent margin
type: boolean
$id: add_safety_to_agent_margin
$ref: sampler
agent_margin:
$defs:
of:
$dynamicAnchor: T
default: 0.100000001
description: initial minimal distance between agents
minimum: 0
type: number
$id: agent_margin
$ref: number_sampler
side:
$defs:
of:
$dynamicAnchor: T
default: 2
description: Distance between targets
exclusiveMinimum: 0
type: number
$id: side
$ref: number_sampler
type:
const: CrossTorus
- properties:
type:
const: Simple