22 if (event.
time <= 0.0)
30 if (event.
time <= 0.0) {
39 event.check_for_trafficlight =
false;
43 auto state =
event.actor->GetState();
54 direction.
x = crosswalkEnd.
x - currentUnrealPos.
x;
55 direction.
y = crosswalkEnd.
y - currentUnrealPos.
y;
56 direction.
z = crosswalkEnd.
z - currentUnrealPos.
z;
bool GetWalkerPosition(ActorId id, carla::geom::Location &location)
get the walker current location
void PauseAgent(ActorId id, bool pause)
set an agent as paused for the crowd
bool HasVehicleNear(ActorId id, float distance, carla::geom::Location direction)
return if the agent has a vehicle near (as neighbour)
EventResult operator()(WalkerEventIgnore &event)
bool GetWalkerCrosswalkEnd(ActorId id, carla::geom::Location &location)
get the point in the route that end current crosswalk
Navigation * GetNavigation()
return the navigation object
SharedPtr< carla::client::TrafficLight > GetTrafficLightAffecting(carla::geom::Location UnrealPos, float max_distance=-1.0f)
return the trafficlight affecting that position
EventResult
result of an event
This file contains definitions of common data structures used in traffic manager.
empty event that just ignores
event to pause and check for near vehicles
bool check_for_trafficlight
SharedPtr< carla::client::TrafficLight > actor
event to wait for a while