110 template<
typename Iterator>
111 void update(
double position_on_current,Iterator current_lf, Iterator first_lf, Iterator last_lf)
121 lcb_.
update(position_on_current,current_lf,first_lf,last_lf);
164 width =
std::max(width,sign*(outside-inside));
198 double min_separation = 0.5;
199 bool gate_open_found =
false;
205 gate_open_found =
true;
214 return gate_open_found;
226 std::vector<adoreMatrix<double,3,1>> navcost_vector;
231 adoreMatrix<double,3,1> value;
232 value(0) = c->second.getDistanceToGoal();
233 value(1) = rb->m_id.m_first.m_X;
234 value(2) = rb->m_id.m_first.m_Y;
235 navcost_vector.push_back(value);
241 adoreMatrix<double,3,1> value;
245 navcost_vector.push_back(value);
249 std::vector<double> svalues;
250 std::vector<double> cvalues;
253 for(
auto& value:navcost_vector)
260 double dx = value(1)-xstart(0);
261 double dy = value(2)-xstart(1);
262 double d = std::sqrt(dx*dx+dy*dy);
267 double dx = value(1)-xend(0);
268 double dy = value(2)-xend(1);
269 double d = std::sqrt(dx*dx+dy*dy);
276 if( svalues.size()>0 && s<svalues[svalues.size()-1])
continue;
277 else if( svalues.size()>0 && s==svalues[svalues.size()-1])
279 if(c<cvalues[cvalues.size()-1])
281 svalues[svalues.size()-1] = s;
282 cvalues[svalues.size()-1] = c;
287 svalues.push_back(s);
288 cvalues.push_back(c);
294 for(
int i=0;i<svalues.size();i++)
A local, non-linear, smooth road coordinate system generated from a sequence of borders.
Definition: baseline.h:31
int defineOffset(BorderSequence &borderSequence, function_type_scalar *offset, double maximum_offset=10.0)
define a function, which represents the offset from baseline to the neighboring function
Definition: baseline.h:199
void update(BorderSequence &borderSequence, double soffset)
compute fit for borderSequence
Definition: baseline.h:125
void setSmoothness(double value)
Definition: baseline.h:112
void setLookBehind(double value)
Definition: baseline.h:117
void setLookAhead(double value)
Definition: baseline.h:116
function_type_xyz position_fct_
Definition: baseline.h:66
bool isValid() const
Definition: baseline.h:113
Definition: bordercostmap.h:31
A class which augments a vector of Border* with some sampling features.
Definition: bordersequence.h:28
efficiently store borders in boost R-tree
Definition: borderset.h:99
Border * getLeftNeighbor(Border *b)
Get left neighbor of a border.
Definition: borderset.h:1252
A class for computation of the geometric information required to perform lane changes....
Definition: independentlanechangegeometry.h:34
function_type_scalar speedLimit_fct_
Definition: independentlanechangegeometry.h:53
IndependentLaneChangeGeometry(bool lc_direction_left, BorderSet *borderSet, BorderCostMap *borderCostMap)
Definition: independentlanechangegeometry.h:97
double maximum_navcost_increase_
Definition: independentlanechangegeometry.h:55
LaneChangeBorders lcb_
Definition: independentlanechangegeometry.h:46
function_type_scalar & getLeftOffsetFct()
Definition: independentlanechangegeometry.h:81
bool computeGateInterval()
compute gate open and close in the domain of the baseline function
Definition: independentlanechangegeometry.h:174
double getProgressGateOpen() const
Definition: independentlanechangegeometry.h:78
function_type_scalar & getRightOffsetFct()
Definition: independentlanechangegeometry.h:85
void setLookAhead(double value)
Definition: independentlanechangegeometry.h:66
bool isValid() const
Definition: independentlanechangegeometry.h:77
BorderCostMap * borderCostMap_
Definition: independentlanechangegeometry.h:37
double progressGateClosed_
Definition: independentlanechangegeometry.h:40
BorderSequence separatingBorders_
Definition: independentlanechangegeometry.h:42
bool sanityTest()
a set of tests making sure that lane change geometry is drivable in real conditions
Definition: independentlanechangegeometry.h:147
bool valid_
Definition: independentlanechangegeometry.h:38
BorderSet * borderSet_
Definition: independentlanechangegeometry.h:36
double getMaximumTargetLaneWidth()
returns the maximum width of the lane change
Definition: independentlanechangegeometry.h:156
bool collectSeparatingBorders()
collects points describing the inner, separating border The separating borders are defined as a seque...
Definition: independentlanechangegeometry.h:321
bool collectNavigationCostBorders()
collects points describing the navigation cost reference borders
Definition: independentlanechangegeometry.h:451
void update(double position_on_current, Iterator current_lf, Iterator first_lf, Iterator last_lf)
constructs a lane change geometry if a gate is available
Definition: independentlanechangegeometry.h:111
function_type_scalar navigationCost_fct_
Definition: independentlanechangegeometry.h:52
function_type_scalar & getOffsetTargetOuterBordersFct()
Definition: independentlanechangegeometry.h:93
BorderSequence navigationCostBorders_
Definition: independentlanechangegeometry.h:45
bool computeNavigationCostFunction()
projects navigation cost of borders in navigationCostBorders_ unto baseline
Definition: independentlanechangegeometry.h:222
bool collectTargetOuterBorders()
collects points describing the target-side outer border
Definition: independentlanechangegeometry.h:363
bool collectSourceOuterBorders()
collects points describing the source-side outer border
Definition: independentlanechangegeometry.h:407
function_type_scalar & getOffsetSourceOuterBordersFct()
Definition: independentlanechangegeometry.h:89
BorderSequence targetOuterBorders_
Definition: independentlanechangegeometry.h:44
bool navigationCost_fcn_available_
Definition: independentlanechangegeometry.h:54
double getProgressGateClosed() const
Definition: independentlanechangegeometry.h:79
double progressGateOpen_
Definition: independentlanechangegeometry.h:39
function_type_scalar offsetSeparatingBorders_
Definition: independentlanechangegeometry.h:49
Baseline baseline_
Definition: independentlanechangegeometry.h:47
void setSmoothness(double value)
Definition: independentlanechangegeometry.h:58
function_type_scalar offsetSourceOuterBorders_
Definition: independentlanechangegeometry.h:50
BorderSequence sourceOuterBorders_
Definition: independentlanechangegeometry.h:43
function_type_scalar offsetTargetOuterBorders_
Definition: independentlanechangegeometry.h:51
void setLookBehind(double value)
Definition: independentlanechangegeometry.h:71
bool isNavigationCostFcnAvailable() const
Definition: independentlanechangegeometry.h:80
bool computeGateInterval_v2()
compute gate open and close in the domain of the baseline function. this version uses offset function...
Definition: independentlanechangegeometry.h:194
void setMaximumNavCostIncrease(double value)
Definition: independentlanechangegeometry.h:62
Selects Borders from BorderSet required for LaneChangeView construction.
Definition: lanechangeborders.h:30
void setLookAhead(double value)
Definition: lanechangeborders.h:85
std::vector< Border * > gate_target_borders_
Definition: lanechangeborders.h:44
void update(double position_on_current, Iterator current_lf, Iterator first_lf, Iterator last_lf)
collects all borders relevant for lane change view in object-variable vectors
Definition: lanechangeborders.h:127
bool isLCDirectionLeft()
Definition: lanechangeborders.h:57
std::vector< Border * > gate_source_borders_
Definition: lanechangeborders.h:45
bool isValid()
Definition: lanechangeborders.h:61
double getNavCostIncrease()
Definition: lanechangeborders.h:101
std::vector< Border * > upstream_borders_
Definition: lanechangeborders.h:47
std::vector< Border * > downstream_borders_
Definition: lanechangeborders.h:46
double getDistanceToCurrent()
Definition: lanechangeborders.h:77
void setConinueOnIncreasingCost(bool value)
Definition: lanechangeborders.h:97
void setLookBehind(double value)
Definition: lanechangeborders.h:93
void setData(const adoreMatrix< T, n+1, 0 > &data)
Definition: llinearpiecewisefunction.h:580
double getClosestParameter(T px, T py, int d1, int d2, T &n_min) const
Definition: llinearpiecewisefunction.h:1014
virtual DT limitLo() const override
Definition: llinearpiecewisefunction.h:264
adoreMatrix< T, n+1, 0 > & getData()
Definition: llinearpiecewisefunction.h:147
virtual DT limitHi() const override
Definition: llinearpiecewisefunction.h:259
adore::mad::LLinearPiecewiseFunctionM< double, 1 > function_type_scalar
Definition: linearfunctiontypedefs.h:24
adoreMatrix< T, N, M > max(adoreMatrix< T, N, M > a, const adoreMatrix< T, N, M > &b)
Definition: adoremath.h:686
Definition: areaofeffectconverter.h:20
Coordinate m_last
Definition: borderid.h:32
The border struct contains data of the smallest.
Definition: border.h:62
double getLength()
Get the length of the border.
Definition: border.h:703
BorderID m_id
Definition: border.h:68
This struct represents 3-dimensional coordines.
Definition: coordinate.h:34
double m_Y
Definition: coordinate.h:35
double m_X
Definition: coordinate.h:35