16 #include <recast/Recast.h> 17 #include <recast/DetourCrowd.h> 18 #include <recast/DetourNavMesh.h> 19 #include <recast/DetourNavMeshBuilder.h> 20 #include <recast/DetourNavMeshQuery.h> 21 #include <recast/DetourCommon.h> 65 bool Load(
const std::string &filename);
67 bool Load(std::vector<uint8_t> content);
70 std::vector<carla::geom::Location> &path, std::vector<unsigned char> &area);
72 std::vector<carla::geom::Location> &path, std::vector<unsigned char> &area);
75 void SetSimulator(std::weak_ptr<carla::client::detail::Simulator> simulator);
77 void SetSeed(
unsigned int seed);
79 void CreateCrowd(
void);
87 bool UpdateVehicles(std::vector<VehicleCollisionInfo> vehicles);
89 bool SetWalkerMaxSpeed(
ActorId id,
float max_speed);
100 float GetWalkerSpeed(
ActorId id);
106 void SetPedestriansCrossFactor(
float percentage);
108 void PauseAgent(
ActorId id,
bool pause);
114 bool IsWalkerAlive(
ActorId id,
bool &alive);
123 bool _ready {
false };
125 double _delta_seconds { 0.0 };
127 dtNavMesh *_nav_mesh {
nullptr };
128 dtNavMeshQuery *_nav_query {
nullptr };
130 dtCrowd *_crowd {
nullptr };
140 double _time_to_unblock { 0.0 };
149 float _probability_crossing { 0.0f };
152 void SetAgentFilter(
int agent_index,
int filter_index);
std::unordered_map< ActorId, int > _mapped_vehicles_id
std::vector< uint8_t > _binary_mesh
std::unordered_map< int, ActorId > _mapped_by_index
double GetDeltaSeconds()
return the last delta seconds
std::unordered_map< ActorId, int > _mapped_walkers_id
mapping Id
This file contains definitions of common data structures used in traffic manager. ...
Represents the state of all the actors of an episode at a given frame.
static EpisodeProxyPointerType::Shared Load(EpisodeProxyPointerType::Strong ptr)
carla::geom::BoundingBox bounding
WalkerManager _walker_manager
walker manager for the route planning with events
carla::geom::Transform transform
std::unordered_map< ActorId, float > _yaw_walkers
store walkers yaw angle from previous tick
std::weak_ptr< carla::client::detail::Simulator > _simulator
std::unordered_map< int, carla::geom::Vector3D > _walkers_blocked_position
saves the position of each actor at intervals and check if any is blocked
struct to send info about vehicles to the crowd
Inherit (privately) to suppress copy/move construction and assignment.
Manage the pedestrians navigation, using the Recast & Detour library for low level calculations...