Go to the documentation of this file.
32 #define TIME_OVERLAP (1)
77 int32_t collision = -1;
83 float weight = pot + h;
111 for (
Vertex &res : resolutions)
114 res.weight = res.potential + h;
130 float weight = pot + h;
154 if (foundEnd == NULL)
158 if (&_end != foundEnd)
179 start.predecessor_ = NULL;
181 start.collision = -1;
183 const std::vector<std::reference_wrapper<Vertex>> &n_succ =
start.getPlanningSuccessors();
196 const std::vector<std::reference_wrapper<Vertex>> &n_pred =
start.getPlanningPredecessors();
215 int32_t collision = -1;
221 else if (collision != -1)
230 for (
const Vertex &v : _list)
void SetMultiplier(const float &_multiplier)
sets the Potential multiplier
void resolveStartCollision(Vertex &_start, Vertex &_end)
bool containsVertex(const Vertex &_v, const std::vector< std::reference_wrapper< Vertex >> &_list) const
void reset()
resets the session
BacktrackingResolution btr_
float CalculatePotential(const Vertex &_vertex) const
calculates the potential for a vertex
virtual void saveCollision(const uint32_t _coll)=0
increases the collision count of one robot
const Segment & getSegment() const
std::vector< std::unique_ptr< Vertex > > startSegments_
std::priority_queue< Vertex *, std::vector< Vertex * >, greaterSegmentWrapper > seg_queue_
void updateVertex(const Vertex &_v)
Vertex * expandVoronoi(Vertex &_start, Vertex &_end, const uint32_t _cycles)
virtual std::vector< std::reference_wrapper< Vertex > > resolve(Vertex &_current, Vertex &_next, int32_t _collision)=0
resolves a found collision between two robots.
uint32_t getSegmentId() const
void clearpq(std::priority_queue< T, S, C > &q)
virtual void resetSession(const RouteCoordinatorWrapper *_route_querry, const PotentialCalculator *_pCalc, const uint32_t _robot_radius)=0
resets the session (setting the new route querry and potential calculator)
std::vector< uint32_t > collisions_robots_
const std::vector< std::reference_wrapper< Vertex > > & getPlanningPredecessors() const
const std::vector< std::reference_wrapper< Vertex > > & getPlanningSuccessors() const
bool calculatePotentials(const RouteCoordinatorWrapper *_p, Vertex &_start, Vertex &_end, const uint32_t _maxIterations, const uint32_t _radius)
assigns all Vertices in the Search graph with a potential according to the distance to the start
SegmentExpander(const CollisionResolverType _cRes)
constructor
const std::vector< uint32_t > & getRobotCollisions() const
returns the found robotCollisions while planning
void addStartExpansionCandidate(Vertex &_start, Vertex &_current, Vertex &_next, Vertex &_end)
float calcHeuristic(const Vertex &_next, const Vertex &_end) const
calculates the euclidean distance to the end vertex
PotentialCalculator pCalc_
CollisionResolution * collision_resolution_
const RouteCoordinatorWrapper * route_querry_
void setCollisionResolver(const CollisionResolverType cRes)
sets the desired collision resolver
void setSpeed(const float &_speed)
Sets the multiplier to reduce a robots speed (pCalc...)
void addExpansoionCandidate(Vertex &_current, Vertex &_next, Vertex &_end)
virtual const std::vector< uint32_t > & getRobotCollisions() const =0
returns amount of robot collisions found in each resolve try after resetSession
CollisionResolverType getCollisionResolver() const
gets the currently used collision resolver
bool checkSegment(const Vertex &_next, const uint32_t _startTime, const int32_t _endTime, const uint32_t _diameterPixel, int32_t &_collisionRobot, bool _ignoreGoal=false) const
calls checkSegment of the routeCoordinator using robot
CollisionResolverType crType_