Fix bug in navigation, erroneous index
This commit is contained in:
parent
b6cfcbe92c
commit
f66593427b
|
@ -684,7 +684,7 @@ namespace nav {
|
|||
std::lock_guard<std::mutex> lock(_mutex);
|
||||
_crowd->removeAgent(it->second);
|
||||
}
|
||||
_walkerManager.RemoveWalker(it->second);
|
||||
_walkerManager.RemoveWalker(id);
|
||||
logging::log("Nav: removing walker agent", id);
|
||||
// remove from mapping
|
||||
_mappedWalkersId.erase(it);
|
||||
|
@ -914,7 +914,7 @@ namespace nav {
|
|||
// set a new random target
|
||||
carla::geom::Location location;
|
||||
GetRandomLocation(location, 1, nullptr);
|
||||
_walkerManager.SetWalkerRoute(i, location);
|
||||
_walkerManager.SetWalkerRoute(_mappedByIndex[i], location);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue