57 std::vector<WalkerRoutePoint>
route;
83 void SetSimulator(std::weak_ptr<carla::client::detail::Simulator> simulator);
管理行人导航,使用 Recast & Detour 库进行低层计算。
bool RemoveWalker(ActorId id)
std::vector< std::pair< SharedPtr< carla::client::TrafficLight >, carla::geom::Location > > _traffic_lights
bool AddWalker(ActorId id)
bool GetWalkerCrosswalkEnd(ActorId id, carla::geom::Location &location)
void SetSimulator(std::weak_ptr< carla::client::detail::Simulator > simulator)
EventResult ExecuteEvent(ActorId id, WalkerInfo &info, double delta)
bool Update(double delta)
bool GetWalkerNextPoint(ActorId id, carla::geom::Location &location)
bool SetWalkerNextPoint(ActorId id)
Navigation * GetNavigation()
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)
void SetNav(Navigation *nav)
bool SetWalkerRoute(ActorId id)
boost::variant2::variant< WalkerEventIgnore, WalkerEventWait, WalkerEventStopAndCheck > WalkerEvent
行人事件变体
boost::shared_ptr< T > SharedPtr
使用这个SharedPtr(boost::shared_ptr)以保持与boost::python的兼容性, 但未来如果可能的话,我们希望能为std::shared_ptr制作一个Python适配器。
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)