45 bool SpeedScheduler::rescheduleSpeeds(
const uint32_t _collidingRobot,
const std::vector<uint32_t> &_collisions, std::vector<float> &_newSchedule, int32_t &_firstRobotToReplan)
53 _firstRobotToReplan = -1;
54 uint32_t collisions = 0;
56 for (
int i = 0; i < _collisions.size(); i++)
58 if (_collisions[i] > collisions && i != _collidingRobot)
60 _firstRobotToReplan = i;
61 collisions = _collisions[i];
74 _firstRobotToReplan = -1;
void reset(const uint32_t _nrRobots)
resets the speed rescheduler (all speeds to max)
std::vector< float > actualSpeedSchedule_
bool rescheduleSpeeds(const uint32_t _collidingRobot, const std::vector< uint32_t > &_collsisions, std::vector< float > &_newSchedule, int32_t &_firstRobotToReplan)
reduces a selected robots maximum speed
SpeedScheduler(const uint32_t _nrRobots)
constructor
std::vector< std::vector< float > > checkedSchedules_
const std::vector< float > & getActualSpeeds()
returns the computed speed schedule