26 :
public std::enable_shared_from_this<WalkerNavigation>,
41 while (i < list->size()) {
42 if ((*list)[i].walker == walker_id &&
43 (*list)[i].controller == controller_id) {
61 void Tick(std::shared_ptr<Episode> episode);
67 return boost::optional<geom::Location>(random_location);
boost::optional< geom::Location > GetRandomLocation()
bool SetWalkerTarget(ActorId id, const carla::geom::Location to)
void CheckIfWalkerExist(std::vector< WalkerHandle > walkers, const EpisodeState &state)
check a few walkers and if they don't exist then remove from the crowd
Holds an atomic pointer to a list.
WalkerNavigation(std::weak_ptr< Simulator > simulator)
bool AddWalker(ActorId id, carla::geom::Location from)
create a new walker
bool RemoveAgent(ActorId id)
remove an agent
unsigned long _next_check_index
This file contains definitions of common data structures used in traffic manager. ...
AtomicList< WalkerHandle > _walkers
Represents the state of all the actors of an episode at a given frame.
bool SetWalkerTarget(ActorId id, carla::geom::Location to)
set a new target point to go through a route with events
void SetPedestriansSeed(unsigned int seed)
carla::nav::Navigation _nav
bool SetWalkerMaxSpeed(ActorId id, float max_speed)
void UpdateVehiclesInCrowd(std::shared_ptr< Episode > episode, bool show_debug=false)
add/update/delete all vehicles in crowd
void SetPedestriansCrossFactor(float percentage)
set the probability that an agent could cross the roads in its path following
void SetPedestriansCrossFactor(float percentage)
void Tick(std::shared_ptr< Episode > episode)
void AddWalker(ActorId walker_id, carla::geom::Location location)
void UnregisterWalker(ActorId walker_id, ActorId controller_id)
bool GetRandomLocation(carla::geom::Location &location, dtQueryFilter *filter=nullptr) const
get a random location for navigation
void RegisterWalker(ActorId walker_id, ActorId controller_id)
void SetSeed(unsigned int seed)
set the seed to use with random numbers
bool SetWalkerMaxSpeed(ActorId id, float max_speed)
set new max speed
std::weak_ptr< Simulator > _simulator
Inherit (privately) to suppress copy/move construction and assignment.
Manage the pedestrians navigation, using the Recast & Detour library for low level calculations...
void RemoveWalker(ActorId walker_id)