27 class WalkerNavigation;
35 :
public std::enable_shared_from_this<Episode>,
39 explicit Episode(
Client &client, std::weak_ptr<Simulator> simulator);
49 std::shared_ptr<const EpisodeState>
GetState()
const {
59 std::vector<rpc::Actor>
GetActorsById(
const std::vector<ActorId> &actor_ids);
A very simple atomic shared ptr with release-acquire memory order.
Inherit (privately) to suppress copy/move construction and assignment.
This class is meant to be used similar to a shared future, but the value can be set any number of tim...
Keeps a list of actor descriptions to avoid requesting each time the descriptions to the server.
void Insert(rpc::Actor actor)
Inserts an actor into the list.
Provides communication with the rpc and streaming servers of a CARLA simulator.
Holds the current episode, and the current episode state.
void RemoveOnTickEvent(size_t id)
RecurrentSharedFuture< WorldSnapshot > _snapshot
size_t RegisterLightUpdateChangeEvent(std::function< void(WorldSnapshot)> callback)
AtomicSharedPtr< const EpisodeState > _state
std::weak_ptr< Simulator > _simulator
CallbackList< WorldSnapshot > _on_tick_callbacks
void AddPendingException(std::string e)
void RegisterActor(rpc::Actor actor)
size_t RegisterOnTickEvent(std::function< void(WorldSnapshot)> callback)
std::shared_ptr< WalkerNavigation > CreateNavigationIfMissing()
boost::optional< WorldSnapshot > WaitForState(time_duration timeout)
std::vector< rpc::Actor > GetActorsById(const std::vector< ActorId > &actor_ids)
std::string _pending_exceptions_msg
size_t RegisterOnMapChangeEvent(std::function< void(WorldSnapshot)> callback)
std::shared_ptr< const EpisodeState > GetState() const
const streaming::Token _token
AtomicSharedPtr< WalkerNavigation > _walker_navigation
void RemoveLightUpdateChangeEvent(size_t id)
void SetPedestriansSeed(unsigned int seed)
void RemoveOnMapChangeEvent(size_t id)
bool HasMapChangedSinceLastCall()
std::vector< rpc::Actor > GetActors()
void SetPedestriansCrossFactor(float percentage)
CallbackList< WorldSnapshot > _on_light_update_callbacks
CallbackList< WorldSnapshot > _on_map_change_callbacks
Episode(Client &client, std::weak_ptr< Simulator > simulator)
boost::optional< rpc::Actor > GetActorById(ActorId id)
A token that uniquely identify a stream.
Positive time duration up to milliseconds resolution.
This file contains definitions of common data structures used in traffic manager.