sisl / AutomotiveDrivingModels.jl

Driving simulation architecture for Julia
Other
63 stars 29 forks source link

Redesign get_neighbor_... functions #69

Closed MaximeBouton closed 4 years ago

MaximeBouton commented 4 years ago

the functions get_neighbor_fore_along_lane, get_neighbor_fore_along_left_lane ... contain a lot of repeated code.

It could be nice to redesign this part to have one function find_neighbor that would accept as argument the specification: fore, rear, left lane, right lane ... The signature could be find_neighbor(scene, roadway, ego, lane; rear=False). This function would find the front neighbor of ego in lane. It would find the rear neihbor if rear is set to true.