123 std::vector<carla::geom::Location> path;
124 std::vector<unsigned char> area;
137 info.
route.reserve(path.size());
139 for (
unsigned int i=0; i<path.size(); ++i) {
158 previous_area = area[i];
239 while (pos < info.
route.size()) {
241 location = info.
route[pos].location;
257 return boost::variant2::visit(visitor, rp.
event);
std::vector< WalkerRoutePoint > route
bool GetWalkerNextPoint(ActorId id, carla::geom::Location &location)
get the next point in the route
bool GetWalkerPosition(ActorId id, carla::geom::Location &location)
get the walker current location
float SquaredLength() const
void PauseAgent(ActorId id, bool pause)
set an agent as paused for the crowd
This file contains definitions of common data structures used in traffic manager. ...
EventResult
result of an event
bool RemoveWalker(ActorId id)
remove a walker route
bool SetWalkerNextPoint(ActorId id)
set the next point in the route
carla::geom::Location from
event to pause and check for near vehicles
bool SetWalkerDirectTarget(ActorId id, carla::geom::Location to)
std::unordered_map< ActorId, WalkerInfo > _walkers
EventResult ExecuteEvent(ActorId id, WalkerInfo &info, double delta)
bool GetWalkerCrosswalkEnd(ActorId id, carla::geom::Location &location)
get the point in the route that end current crosswalk
bool GetAgentRoute(ActorId id, carla::geom::Location from, carla::geom::Location to, std::vector< carla::geom::Location > &path, std::vector< unsigned char > &area)
bool GetRandomLocation(carla::geom::Location &location, dtQueryFilter *filter=nullptr) const
get a random location for navigation
bool Update(double delta)
update all routes
bool SetWalkerRoute(ActorId id)
set a new route from its current position
empty event that just ignores
bool AddWalker(ActorId id)
create a new walker route
unsigned int currentIndex