route_coordinator.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017, <copyright holder> <email>
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of the <organization> nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY <copyright holder> <email> ''AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL <copyright holder> <email> BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  */
28 
30 
31 namespace multi_robot_router
32 {
34 {
35  robot_ = _robot;
36  routeCoordinator_ = &_routeCoordinator;
37 }
38 
39 bool RouteCoordinatorWrapper::checkSegment(const Vertex &_next, const uint32_t _startTime, const int32_t _endTime, const uint32_t _diameterPixel, int32_t &_collisionRobot, bool _ignoreGoal) const
40 {
41  return routeCoordinator_->checkSegment(_next, _startTime, _endTime, _diameterPixel, _collisionRobot, robot_, _ignoreGoal);
42 }
43 
44 int32_t RouteCoordinatorWrapper::findPotentialUntilRobotOnSegment(const uint32_t _robot, const uint32_t _segId) const
45 {
47 }
48 
49 const uint32_t RouteCoordinatorWrapper::getEnd() const
50 {
52 }
53 
54 std::vector<std::pair<uint32_t, float>> RouteCoordinatorWrapper::getListOfRobotsHigherPrioritizedRobots(const uint32_t _robot, const uint32_t _segId, const int32_t _potential) const
55 {
56  return routeCoordinator_->getListOfRobotsHigherPrioritizedRobots(_robot, _segId, _potential);
57 }
58 
59 const uint32_t RouteCoordinatorWrapper::getStart() const
60 {
62 }
63 
64 bool RouteCoordinatorWrapper::isGoal(const Vertex &_seg) const
65 {
66  return routeCoordinator_->isGoal(_seg, robot_);
67 }
68 
69 } // namespace multi_robot_router
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
bool isGoal(const Vertex &_seg) const
calls isGoal of the routeCoordinator using robot
const uint32_t getEnd() const
calls getEnd of the routeCoordinator using robot
virtual int32_t findPotentialUntilRobotOnSegment(const uint32_t _robot, const uint32_t _segId) const =0
returns the time point, when a robot leaves a vertex
virtual const uint32_t getStart(const uint32_t _robotId) const =0
returns the start of a robot
int32_t findPotentialUntilRobotOnSegment(const uint32_t _robot, const uint32_t _segId) const
calls findPotentialUntilRobotOnSegment of the routeCoordinator using robot
virtual const uint32_t getEnd(const uint32_t _robotId) const =0
returns the Goal of a robot
RouteCoordinatorWrapper(const uint32_t _robot, const RouteCoordinator &_routeCoordinater)
constructor to save the routecoordinator and the current robot
const uint32_t getStart() const
calls getStart of the routeCoordinator using robot
virtual std::vector< std::pair< uint32_t, float > > getListOfRobotsHigherPrioritizedRobots(const uint32_t _robot, const uint32_t _segId, const int32_t _potential) const =0
returns all robots which pass the segment before the given robot and a given time ...
std::vector< std::pair< uint32_t, float > > getListOfRobotsHigherPrioritizedRobots(const uint32_t _robot, const uint32_t _segId, const int32_t _potential) const
calls getListOfRobotsHigherPrioritizedRobots of the routeCoordinator using robot
virtual bool isGoal(const Vertex &_seg, const uint32_t _robotId) const =0
returns if a Vertex is the goal vertex for a robot
virtual bool checkSegment(const Vertex &_next, const uint32_t _startTime, const int32_t _endTime, const uint32_t _diameterPixel, int32_t &_collisionRobot, const uint32_t _robotId, bool _ignoreGoal=false) const =0
updates the goal segments of the planning attempt


tuw_multi_robot_router
Author(s): Benjamin Binder
autogenerated on Mon Jun 10 2019 15:42:49