Fixed Setup.sh permissions and other files

This commit is contained in:
Marc Garcia Puig 2019-12-02 16:32:04 +01:00 committed by bernat
parent ad0488006a
commit afea285a93
3 changed files with 5 additions and 4 deletions

View File

@ -1141,7 +1141,7 @@ namespace nav {
agent->paused = pause; agent->paused = pause;
} }
bool Navigation::HasVehicleNear(ActorId id, float distance) { bool Navigation::HasVehicleNear(ActorId id, float distance, carla::geom::Location direction) {
// get the internal index (walker or vehicle) // get the internal index (walker or vehicle)
auto it = _mapped_walkers_id.find(id); auto it = _mapped_walkers_id.find(id);
if (it == _mapped_walkers_id.end()) { if (it == _mapped_walkers_id.end()) {
@ -1151,11 +1151,12 @@ namespace nav {
} }
} }
float dir[3] = { direction.x, direction.z, direction.y };
bool result; bool result;
{ {
// critical section, force single thread running this // critical section, force single thread running this
std::lock_guard<std::mutex> lock(_mutex); std::lock_guard<std::mutex> lock(_mutex);
result = _crowd->hasVehicleNear(it->second, distance * distance, false); result = _crowd->hasVehicleNear(it->second, distance * distance, dir, false);
} }
return result; return result;
} }

View File

@ -103,9 +103,9 @@ namespace nav {
/// set an agent as paused for the crowd /// set an agent as paused for the crowd
void PauseAgent(ActorId id, bool pause); void PauseAgent(ActorId id, bool pause);
/// return if the agent has a vehicle near (as neighbour) /// return if the agent has a vehicle near (as neighbour)
bool HasVehicleNear(ActorId id, float distance); bool HasVehicleNear(ActorId id, float distance, carla::geom::Location direction);
/// make agent look at some location /// make agent look at some location
bool SetWalkerLookAt(ActorId id, carla::geom::Location location); bool SetWalkerLookAt(ActorId id, carla::geom::Location location);
dtCrowd *GetCrowd() { return _crowd; }; dtCrowd *GetCrowd() { return _crowd; };

0
Util/BuildTools/Setup.sh Normal file → Executable file
View File