You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I once made a map as attachment,
'#' means obstacle,
'.' means space,
'1','2','3' is start position of three agent, and 'A', 'B', 'C' is the goal position one by one.
When I apply the cbs implemention, It falls into an infinite loop.
To reproduce the problem, I slightly modifed the source code of cbs.cpp as following.
......
// std::unordered_set obstacles;
// for (const auto& node : config["map"]["obstacles"]) {
//obstacles.insert(Location(node[0].as(), node[1].as()));
// }
std::unordered_set obstacles;
std::ifstream map(mapFile);
int y = 0;
while (map.good()) {
std::string line;
std::getline(map, line);
int x = 0;
for (char c : line) {
if (c == '#') {
obstacles.insert(Location(x, y));
}
++x;
}
++y;
}
......
I once made a map as attachment,
'#' means obstacle,
'.' means space,
'1','2','3' is start position of three agent, and 'A', 'B', 'C' is the goal position one by one.
When I apply the cbs implemention, It falls into an infinite loop.
To reproduce the problem, I slightly modifed the source code of cbs.cpp as following.
......
// std::unordered_set obstacles;
// for (const auto& node : config["map"]["obstacles"]) {
//obstacles.insert(Location(node[0].as(), node[1].as()));
// }
std::unordered_set obstacles;
std::ifstream map(mapFile);
int y = 0;
while (map.good()) {
std::string line;
std::getline(map, line);
int x = 0;
for (char c : line) {
if (c == '#') {
obstacles.insert(Location(x, y));
}
++x;
}
++y;
}
......
map.txt
The text was updated successfully, but these errors were encountered: