task_layout
task_layout
¶
Task layout metadata for synthetic benchmark visualization and rendering.
SyntheticTaskLayout
dataclass
¶
Task-specific layout data for rendering and visualization.
Attributes:
| Name | Type | Description |
|---|---|---|
start |
ndarray
|
Start position in [0, 1]x[0, 1] Cartesian space. Shape (2,). |
goals |
ndarray | None
|
Expert goal positions used during data generation, shape (num_goals, 2), or None for tasks with no fixed goal. |
obstacles |
list[tuple[float, float, float, float]]
|
List of (x_min, y_min, x_max, y_max) rectangles. |
num_modes |
int
|
Number of behavioral modes for this task. |
get_task_layout
¶
Return the layout data (start, goal, obstacles, num_modes) for a task.
For radial and corridor tasks, obstacles depend on the number of modes and are generated dynamically.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_name
|
str
|
SyntheticTaskName.value string. |
required |
num_modes
|
int | None
|
Number of modes for tasks with variable mode count (radial, corridor_navigation). Uses task defaults when None. |
None
|
num_styles
|
int | None
|
Number of styles per corridor for corridor_navigation. Uses task default when None. |
None
|
noise_std
|
float
|
Trajectory noise std. Passed to obstacle sizing so a 3-sigma noise margin is kept between trajectory and obstacle. |
MULTIPATH_DEFAULT_NOISE_STD
|
Returns:
| Type | Description |
|---|---|
SyntheticTaskLayout
|
SyntheticTaskLayout with the task-specific geometry. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If task_name is not a recognized synthetic task. |