Tabular
Factory
crdata.conversion.tabular.factory
TabularConverterFactory
Bases: AbstractConverterFactory[TabularJob], Generic[WindowMetaT]
Factory base class for building producer-consumer pipelines in the tabular API.
Source code in crdata/conversion/tabular/factory.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
build_job_filter()
Filter scenarios without planning problems, if window is rolling.
Explanation: For rolling windows usually the planning problem is not really needed, since scenarios are usually just used to represent the dataset in CommonRoad format, e.g., for machine learning.
Returns:
| Type | Description |
|---|---|
Callable[[TabularJob], bool]
|
filter function |
Source code in crdata/conversion/tabular/factory.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
Filters
crdata.conversion.tabular.filters
RoutabilityFilter
dataclass
Source code in crdata/conversion/tabular/filters.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
__call__(job)
Checks if a planning problem is routable on scenario
Returns:
| Type | Description |
|---|---|
bool
|
bool, True if CommonRoad planning problem is routeable with max_difficulty |
Source code in crdata/conversion/tabular/filters.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
Interface
crdata.conversion.tabular.interface
IMetaScenarioCreator
Bases: Generic[WindowMetaT]
Create the static elements of a dataset window.
Source code in crdata/conversion/tabular/interface.py
38 39 40 41 42 43 | |
IRecordingGenerator
Bases: Generic[WindowMetaT]
Iterate over the independent recordings of a dataset.
Source code in crdata/conversion/tabular/interface.py
46 47 48 49 50 51 52 53 54 55 56 | |
__iter__()
abstractmethod
Create an iterator that iterates over independent recordings.
Returns:
| Type | Description |
|---|---|
Iterator[tuple[Window, WindowMetaT]]
|
Tuple of the full recordings window and a generic meta information object to be used by subsequent steps to identify the recording. |
Source code in crdata/conversion/tabular/interface.py
49 50 51 52 53 54 55 56 | |
IWindowGenerator
Bases: Generic[WindowMetaT]
Subdivide a larger window.
Source code in crdata/conversion/tabular/interface.py
28 29 30 31 32 33 34 35 | |
Window
dataclass
Contiguous subset of time steps of a dataset, consisting of vehicle states.
Source code in crdata/conversion/tabular/interface.py
10 11 12 13 14 15 16 17 18 19 20 21 22 | |
Job Consumer
crdata.conversion.tabular.job_consumer
TabularJobConsumer
dataclass
Bases: IScenarioJobConsumer[TabularJob]
Consume conversion jobs of the tabular API.
Source code in crdata/conversion/tabular/job_consumer.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
Job Producer
crdata.conversion.tabular.job_producer
TabularJob
dataclass
Scenario job of the tabular API.
Source code in crdata/conversion/tabular/job_producer.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |
Planning Problem
crdata.conversion.tabular.planning_problem
EgoPlanningProblemCreator
dataclass
Bases: PlanningProblemCreator
Create a planning problem for all specified dynamic obstacle ids.
Planning problems are created by using the initial state of a dynamic obstacle as initial state of the planning problem and the final state as the center of the goal region. The goal region is an enlarged version of the vehicle's shape. Constraints on the goal time step, orientation, and velocity can be specified by interval half ranges.
Source code in crdata/conversion/tabular/planning_problem.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
FixedEgoPlanningProblemCreator
dataclass
Bases: PlanningProblemCreator
Creates a PlanningProblemSet for a fixed ego vehicle within a specified time interval.
Attributes: ego_vehicle_id (int): The ID of the ego vehicle for which the planning problem is to be created. keep_ego (bool): Indicates whether the ego vehicle should be retained in the meta-scenario. start_time_step (Optional[int]): Start time step for selecting the ego vehicle's states. end_time_step (Optional[int]): End time step for selecting the ego vehicle's states. obstacles_start_at_zero (bool): Whether obstacles should start at time step 0.
Methods: call(window_job: Window, meta_scenario: Scenario) -> PlanningProblemSet: Creates a PlanningProblemSet for the specified ego vehicle and time interval.
Source code in crdata/conversion/tabular/planning_problem.py
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | |
PlanningProblemCreator
Create an empty planning problem.
Source code in crdata/conversion/tabular/planning_problem.py
34 35 36 37 38 39 40 | |
RandomObstaclePlanningProblemWrapper
dataclass
Bases: PlanningProblemCreator
Randomly choose dynamic obstacles from a window as a basis for planning problems.
Only dynamic obstacles of type "car" are considered!
Source code in crdata/conversion/tabular/planning_problem.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | |
Prototype Scenario
crdata.conversion.tabular.prototype_scenario
ScenarioIDCreator
Create a ScenarioID for a Window.
EgoWindow appends ego<ID> to the map name, to avoid overwriting.
Source code in crdata/conversion/tabular/prototype_scenario.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
ScenarioPrototypeCreator
dataclass
Bases: Generic[WindowMetaT]
Create the actual scenario prototype to which the dynamic obstacles are added.
The prototype is created form the meta scenario. Country, map name, map id, author, source, affiliation, and location fields are copied from the meta scenario. Note, that the difference to the MetaScenarioGenerator is the dynamic scenario id of the prototype scenario. The meta scenario has the fixed scenario id of the map.
Source code in crdata/conversion/tabular/prototype_scenario.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
Windowing
crdata.conversion.tabular.windowing
DownsamplingWindowWrapper
dataclass
Bases: IWindowGenerator
Wrap a window generator to downsample the time domain by a fixed factor.
Source code in crdata/conversion/tabular/windowing.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
ObstacleWindowGenerator
dataclass
Bases: IWindowGenerator
Create a window for each dynamic obstacle.
Source code in crdata/conversion/tabular/windowing.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
RollingWindowGenerator
dataclass
Bases: IWindowGenerator
Create windows of fixed length from a recording.
Source code in crdata/conversion/tabular/windowing.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
TimeSliceSamplingWindowGenerator
dataclass
Bases: IWindowGenerator
Sample windows from recording by window sizes.
Note: Resulting windows may overlap!
Source code in crdata/conversion/tabular/windowing.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
VehicleSamplingWindowGenerator
dataclass
Bases: IWindowGenerator
Source code in crdata/conversion/tabular/windowing.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |