48 bool borderFound =
false;
52 for(
auto border = borders.begin();border!=borders.end();border++)
56 matchedBorder = *border;
65 LOG_W(
"Dadore_CORE_Navigation.cpp: No borders were found for given point. Trying to use closest border...");
66 for(
double distance = 1.0;;distance = distance +10.0)
69 auto minDistance = distance;
70 for(;bordersInArea.first!=bordersInArea.second;bordersInArea.first++)
72 double distanceToBorder = distance;
73 auto curBorder = bordersInArea.
first->second;
79 if(distanceToBorder<minDistance)
81 matchedBorder = curBorder;
82 minDistance = distanceToBorder;
88 if(borderFound)
break;
91 LOG_E(
"No border to navigate to was found.");
96 if(matchedBorder==
nullptr)
98 LOG_E(
"Dadore_CORE_Navigation.cpp: No border to navigate to was found.");
102 LOG_I(
"Found border to navigate to.");
104 return matchedBorder;
224 if(targetBorder!=
nullptr)
239 void run(
double x,
double y,
double r, std::vector<adore::env::BorderBased::Border*> &newBorders, std::vector<adore::env::BorderBased::BorderID> &outdatedBorders,
int MAX_SEND_NUMBER = 40)
241 m_map.
run(
x,
y,
r,newBorders,outdatedBorders,MAX_SEND_NUMBER);
251 return std::abs(entry->second);
Definition: bordergraph.h:157
void setLaneChangePenalty(double value)
Definition: bordergraph.h:165
Definition: bordergraph.h:213
std::unordered_map< adore::env::BorderBased::BorderID, double, adore::env::BorderBased::BorderIDHasher > BorderCostMap
Definition: bordergraph.h:220
void djikstra(adore::env::BorderBased::Node *startNode, BorderCostMap *closedList)
Definition: bordergraph.h:247
void init(BorderSet *borderSet)
Definition: bordergraph.h:236
void addFeed(adore::mad::AFeed< Border > *feed)
Definition: border_observer.h:64
efficiently store borders in boost R-tree
Definition: borderset.h:99
void clear()
remove all borders from this, delete object if this is owner
Definition: borderset.h:284
itRegion2Border getBordersInRegion(double x0, double x1, double y0, double y1)
get all borders in this within region
Definition: borderset.h:370
void matchLanesInRegion(double *x, double *y, int count, BorderSubSet &targetSet)
get a vector of borders, which describe lanes that match the specified region
Definition: borderset.h:481
Border * getBorder(const BorderID &id) const
retrieve a border by ID
Definition: borderset.h:628
int size()
number of borders in this
Definition: borderset.h:1497
Definition: navigation_border_observer.h:29
void init(BorderSet *set)
Definition: navigation_border_observer.h:40
bool navigationReplanningNecessary()
Definition: navigation_border_observer.h:82
virtual void update() override
Definition: navigation_border_observer.h:50
Automatically manage local map and necessary updates based on vehicle position and last state of obje...
Definition: map_border_management.h:37
void init(adore::env::BorderBased::BorderSet *baseSet)
initialization routine with base map
Definition: map_border_management.h:164
void reset()
undo all changes to global map and clears local map
Definition: map_border_management.h:193
void clearLocalMap()
clear local map
Definition: map_border_management.h:184
adore::env::BorderBased::BorderSet * getGlobalMap()
Definition: map_border_management.h:210
void run(double x, double y, double r, std::vector< adore::env::BorderBased::Border * > &newBorders, std::vector< adore::env::BorderBased::BorderID > &outdatedBorders, std::vector< adore::env::BorderBased::BorderID > &updatedBorders, int MAX_SEND_NUMBER=40)
Definition: map_border_management.h:272
Definition: navigation_management.h:30
bool hasMap()
Definition: navigation_management.h:147
void addFeed(adore::mad::AFeed< adore::env::BorderBased::Border > *feed)
Definition: navigation_management.h:137
void update(BorderBased::Coordinate newDestination, bool destinationValid)
Definition: navigation_management.h:163
BorderBased::NavigationBorderObserver m_navBorderObserver
Definition: navigation_management.h:38
NavigationManagement()
Definition: navigation_management.h:123
double m_maxCost
Definition: navigation_management.h:32
MapBorderManagement m_map
Definition: navigation_management.h:31
BorderBased::Coordinate m_destination
Definition: navigation_management.h:36
void setDestination(BorderBased::Coordinate c)
Definition: navigation_management.h:212
void init(BorderBased::BorderSet *set)
Definition: navigation_management.h:152
adore::env::BorderBased::Border * getBorder(adore::env::BorderBased::BorderID id)
Definition: navigation_management.h:256
bool goalChanged()
Definition: navigation_management.h:186
bool m_goalChanged
Definition: navigation_management.h:33
void setMaxCost()
Definition: navigation_management.h:107
double m_laneChangePenalty
Definition: navigation_management.h:34
adore::env::BorderBased::BorderSet * getGlobalMap()
Definition: navigation_management.h:261
BorderBased::Border * getBorderFromCurrentTarget()
Definition: navigation_management.h:40
void run(double x, double y, double r, std::vector< adore::env::BorderBased::Border * > &newBorders, std::vector< adore::env::BorderBased::BorderID > &outdatedBorders, int MAX_SEND_NUMBER=40)
Definition: navigation_management.h:239
void setLaneChangePenalty(double value)
Definition: navigation_management.h:132
double getMaxCost()
Definition: navigation_management.h:142
BorderBased::BorderGraph::BorderCostMap m_borderCosts
Definition: navigation_management.h:37
void reset()
Definition: navigation_management.h:195
double getBorderCost(BorderBased::BorderID id)
Definition: navigation_management.h:244
void clear()
Definition: navigation_management.h:206
#define LOG_W(...)
log on warning level
Definition: csvlog.h:46
#define LOG_I(...)
log on info level
Definition: csvlog.h:37
#define LOG_E(...)
log on error level
Definition: csvlog.h:55
@ DRIVING
Definition: border.h:39
std::vector< Border * > BorderSubSet
Definition: borderset.h:92
void set(T *data, T value, int size)
Definition: adoremath.h:39
adoreMatrix< T, N, M > max(adoreMatrix< T, N, M > a, const adoreMatrix< T, N, M > &b)
Definition: adoremath.h:686
x
Definition: adore_set_goal.py:30
y
Definition: adore_set_goal.py:31
r
Definition: adore_suppress_lanechanges.py:209
Definition: areaofeffectconverter.h:20
This struct identifies a Border by the coordinates of the starting and the end point.
Definition: borderid.h:31
The border struct contains data of the smallest.
Definition: border.h:62
This struct represents 3-dimensional coordines.
Definition: coordinate.h:34
double m_Y
Definition: coordinate.h:35
double m_X
Definition: coordinate.h:35
Definition: bordergraph.h:28
T1 first
Definition: borderset.h:47