Fixed Setup.sh permissions and other files
This commit is contained in:
parent
ad0488006a
commit
afea285a93
|
@ -1141,7 +1141,7 @@ namespace nav {
|
|||
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)
|
||||
auto it = _mapped_walkers_id.find(id);
|
||||
if (it == _mapped_walkers_id.end()) {
|
||||
|
@ -1151,11 +1151,12 @@ namespace nav {
|
|||
}
|
||||
}
|
||||
|
||||
float dir[3] = { direction.x, direction.z, direction.y };
|
||||
bool result;
|
||||
{
|
||||
// critical section, force single thread running this
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace nav {
|
|||
/// set an agent as paused for the crowd
|
||||
void PauseAgent(ActorId id, bool pause);
|
||||
/// 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
|
||||
bool SetWalkerLookAt(ActorId id, carla::geom::Location location);
|
||||
|
||||
|
|
Loading…
Reference in New Issue