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)
215 int32_t collision = -1;
221 else if (collision != -1)
230 for (
const Vertex &v : _list)
uint32_t getSegmentId() const
void addExpansoionCandidate(Vertex &_current, Vertex &_next, Vertex &_end)
float calcHeuristic(const Vertex &_next, const Vertex &_end) const
calculates the euclidean distance to the end vertex
std::vector< std::unique_ptr< Vertex > > startSegments_
CollisionResolution * collision_resolution_
Vertex * expandVoronoi(Vertex &_start, Vertex &_end, const uint32_t _cycles)
const std::vector< std::reference_wrapper< Vertex > > & getPlanningPredecessors() const
const std::vector< uint32_t > & getRobotCollisions() const
returns the found robotCollisions while planning
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
std::vector< uint32_t > collisions_robots_
std::priority_queue< Vertex *, std::vector< Vertex * >, greaterSegmentWrapper > seg_queue_
const std::vector< std::reference_wrapper< Vertex > > & getPlanningSuccessors() const
void updateVertex(const Vertex &_v)
PotentialCalculator pCalc_
virtual std::vector< std::reference_wrapper< Vertex > > resolve(Vertex &_current, Vertex &_next, int32_t _collision)=0
resolves a found collision between two robots.
virtual const std::vector< uint32_t > & getRobotCollisions() const =0
returns amount of robot collisions found in each resolve try after resetSession
BacktrackingResolution btr_
float CalculatePotential(const Vertex &_vertex) const
calculates the potential for a vertex
CollisionResolverType crType_
void setCollisionResolver(const CollisionResolverType cRes)
sets the desired collision resolver
virtual void saveCollision(const uint32_t _coll)=0
increases the collision count of one robot
bool containsVertex(const Vertex &_v, const std::vector< std::reference_wrapper< Vertex >> &_list) const
CollisionResolverType getCollisionResolver() const
gets the currently used collision resolver
const Segment & getSegment() const
void SetMultiplier(const float &_multiplier)
sets the Potential multiplier
void resolveStartCollision(Vertex &_start, Vertex &_end)
void setSpeed(const float &_speed)
Sets the multiplier to reduce a robots speed (pCalc...)
void clearpq(std::priority_queue< T, S, C > &q)
void addStartExpansionCandidate(Vertex &_start, Vertex &_current, Vertex &_next, Vertex &_end)
SegmentExpander(const CollisionResolverType _cRes)
constructor
void reset()
resets the session
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)
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 ...
const RouteCoordinatorWrapper * route_querry_