File | Purpose |
---|---|
Curves.jl | Representation for lane centerline curves, which include interpolated values such as curvature and distance along the lane |
Features.jl | A module defining all features. Can be used to extract features from original dataset |
FilesystemUtils.jl | A set of filesystem utilities |
StreetMap.jl | A module defining the street network used in this work. Allows for computing lane projections and making queries relative to the road network |
Trajdata.jl | The base data class storing processed source data |
splines.jl | Used in Curves.jl to represent / fit splines. |
The primary files are Julia modules and can thus be imported freely for use.
using Features
using Trajdata
using StreetMap
using FilesystemUtils
using Curves
Some potentially sensitive Bosch-specific segements of code have been removed.
Allows for the extraction of feature values for cars in scenes.
The primary use case for Features is to extract them from a PrimaryDataset
object. The get()
function is readily available for thus purpose.
Each feature is a separate type extending AbstractFeature
. A feature's type is ::Feature_NAME
, for example: ::Feature_Speed
. A corresponding const type alias is exported using the all caps name, for example: SPEED
. Multiple dispatch allows for the easy extraction of features from the data:
get(SPEED, primary_dataset, street_network, car_index, valid_frame_index)
get()
always returns a Float64
.
Additional information for each type is also available:
description()
- a string describing the feature
units()
- a string describing the units, ex: "m"
isint()
and isbool()
- whether the variable is boolean and/or discrete
upperbound()
and lowerbound()
- the max and min value of the feature, -Inf or Inf if none exists
couldna()
- whether the feature could produce NA
- represented internally by NA_ALIAS = Inf
symbol()
- the Symbol
for the feature
lsymbol()
- a LaTeXString
from the feature
sym2ftr()
- get the Feature
from its Symbol
Features are constructed using Julia's metaprogramming capabilities via the create_feature_basics()
function. get()
is implemented for each feature by hand.
Provides the PrimaryDataset
type used to represent the processed driving data. Exports a large number of functions related to extracting and manipulating the driving data.
Of greatest importance are the following concepts:
frameind
is the frame index, or the index in the original dataset where frameind = 1 is the first frame and frameind = 2 is the second frame, 0.05 seconds later
validfind
is a valid frame index. Frames at the beginning and end of the dataset are off the highway. Validfind = 1 is the first frame on the highway, validfind = 2 is the second, etc. They are almost always consecutive.
carind
refers to the index of a vehicle in a particular frame. The ego vehicle always has index CARIND_EGO = -1
. If there are 5 other vehicles in a frame, they will have index 0, 1, 2, 3, and 4.
carid
refers to the identification number of a vehicle, provided by Bosch. The ego vehicle always has id CARID_EGO = -1
. A vehicle's id number will not change during a drive and should be consistent across frames.
Provides a data structure used to represent the street network structure. It is based off of the Road Network Definition Format developed for the DARPA Grand Challenge. This structure, however, is tiled into 250 x 250 meter chunks for faster lookups.
The StreetNetwork
type contains both a tile dictionary and a graph connecting nodes. Each lane centerline is represented by a set of nodes with roughly 1 meter spacing. For additional details see the source code.
One of the primary purposes of a StreetNetwork
is to allow for the projection of a vehicle position and orientation to a lane-relative frame. This is achieved using project_point_to_streetmap()
and related functions.
Example: