42 std::vector<WalkerRoutePoint>
route;
56 void SetSimulator(std::weak_ptr<carla::client::detail::Simulator> simulator);
92 std::unordered_map<ActorId, WalkerInfo>
_walkers;
95 std::weak_ptr<carla::client::detail::Simulator>
_simulator;
Inherit (privately) to suppress copy/move construction and assignment.
Manage the pedestrians navigation, using the Recast & Detour library for low level calculations.
bool RemoveWalker(ActorId id)
remove a walker route
std::vector< std::pair< SharedPtr< carla::client::TrafficLight >, carla::geom::Location > > _traffic_lights
bool AddWalker(ActorId id)
create a new walker route
bool GetWalkerCrosswalkEnd(ActorId id, carla::geom::Location &location)
get the point in the route that end current crosswalk
void SetSimulator(std::weak_ptr< carla::client::detail::Simulator > simulator)
reference to the simulator to access API functions
EventResult ExecuteEvent(ActorId id, WalkerInfo &info, double delta)
bool Update(double delta)
update all routes
bool GetWalkerNextPoint(ActorId id, carla::geom::Location &location)
get the next point in the route
bool SetWalkerNextPoint(ActorId id)
set the next point in the route
Navigation * GetNavigation()
return the navigation object
std::weak_ptr< carla::client::detail::Simulator > _simulator
std::unordered_map< ActorId, WalkerInfo > _walkers
void GetAllTrafficLightWaypoints()
SharedPtr< carla::client::TrafficLight > GetTrafficLightAffecting(carla::geom::Location UnrealPos, float max_distance=-1.0f)
return the trafficlight affecting that position
void SetNav(Navigation *nav)
assign the navigation module
bool SetWalkerRoute(ActorId id)
set a new route from its current position
EventResult
result of an event
boost::variant2::variant< WalkerEventIgnore, WalkerEventWait, WalkerEventStopAndCheck > WalkerEvent
walker event variant
This file contains definitions of common data structures used in traffic manager.
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...
unsigned int currentIndex
std::vector< WalkerRoutePoint > route
carla::geom::Location from
carla::geom::Location location
WalkerRoutePoint(WalkerEvent ev, carla::geom::Location loc, unsigned char area)