Holds the current episode, and the current episode state. 更多...
#include <Episode.h>
Public 成员函数 | |
void | AddPendingException (std::string e) |
std::shared_ptr< WalkerNavigation > | CreateNavigationIfMissing () |
Episode (Client &client, std::weak_ptr< Simulator > simulator) | |
boost::optional< rpc::Actor > | GetActorById (ActorId id) |
std::vector< rpc::Actor > | GetActors () |
std::vector< rpc::Actor > | GetActorsById (const std::vector< ActorId > &actor_ids) |
auto | GetId () const |
std::shared_ptr< const EpisodeState > | GetState () const |
bool | HasMapChangedSinceLastCall () |
void | Listen () |
void | RegisterActor (rpc::Actor actor) |
size_t | RegisterLightUpdateChangeEvent (std::function< void(WorldSnapshot)> callback) |
size_t | RegisterOnMapChangeEvent (std::function< void(WorldSnapshot)> callback) |
size_t | RegisterOnTickEvent (std::function< void(WorldSnapshot)> callback) |
void | RemoveLightUpdateChangeEvent (size_t id) |
void | RemoveOnMapChangeEvent (size_t id) |
void | RemoveOnTickEvent (size_t id) |
void | SetPedestriansCrossFactor (float percentage) |
void | SetPedestriansSeed (unsigned int seed) |
boost::optional< WorldSnapshot > | WaitForState (time_duration timeout) |
~Episode () | |
Private 成员函数 | |
Episode (Client &client, const rpc::EpisodeInfo &info, std::weak_ptr< Simulator > simulator) | |
void | OnEpisodeChanged () |
void | OnEpisodeStarted () |
Private 成员函数 继承自 carla::NonCopyable | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable (NonCopyable &&)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
NonCopyable & | operator= (NonCopyable &&)=delete |
Private 属性 | |
CachedActorList | _actors |
Client & | _client |
CallbackList< WorldSnapshot > | _on_light_update_callbacks |
CallbackList< WorldSnapshot > | _on_map_change_callbacks |
CallbackList< WorldSnapshot > | _on_tick_callbacks |
bool | _pending_exceptions = false |
std::string | _pending_exceptions_msg |
bool | _should_update_map = true |
std::weak_ptr< Simulator > | _simulator |
RecurrentSharedFuture< WorldSnapshot > | _snapshot |
AtomicSharedPtr< const EpisodeState > | _state |
const streaming::Token | _token |
AtomicSharedPtr< WalkerNavigation > | _walker_navigation |
Holds the current episode, and the current episode state.
The episode state changes in the background each time a world tick is received. The episode may change with any background update if the simulator has loaded a new episode.
|
explicit |
在文件 Episode.cpp 第 37 行定义.
carla::client::detail::Episode::~Episode | ( | ) |
在文件 Episode.cpp 第 46 行定义.
引用了 _client, _token, carla::log_error() , 以及 carla::client::detail::Client::UnSubscribeFromStream().
|
private |
在文件 Episode.cpp 第 40 行定义.
|
inline |
引用了 _pending_exceptions , 以及 _pending_exceptions_msg.
std::shared_ptr< WalkerNavigation > carla::client::detail::Episode::CreateNavigationIfMissing | ( | ) |
在文件 Episode.cpp 第 152 行定义.
引用了 _simulator , 以及 _walker_navigation.
boost::optional< rpc::Actor > carla::client::detail::Episode::GetActorById | ( | ActorId | id | ) |
std::vector< rpc::Actor > carla::client::detail::Episode::GetActors | ( | ) |
在文件 Episode.cpp 第 129 行定义.
引用了 _actors, _client, carla::client::detail::GetActorsById_Impl() , 以及 GetState().
std::vector< rpc::Actor > carla::client::detail::Episode::GetActorsById | ( | const std::vector< ActorId > & | actor_ids | ) |
在文件 Episode.cpp 第 125 行定义.
引用了 _actors, _client , 以及 carla::client::detail::GetActorsById_Impl().
|
inline |
|
inline |
引用了 _state.
被这些函数引用 GetActors(), GetId() , 以及 carla::client::detail::SynchronizeFrame().
bool carla::client::detail::Episode::HasMapChangedSinceLastCall | ( | ) |
在文件 Episode.cpp 第 144 行定义.
引用了 _should_update_map.
void carla::client::detail::Episode::Listen | ( | ) |
Check for pending exceptions (Mainly TM server closed)
Mark pending exception false
Create exception for the error message
Sensor case: inconsistent data
Episode change
在文件 Episode.cpp 第 54 行定义.
引用了 _client, _token, carla::client::detail::CastData(), carla::sensor::Deserializer::Deserialize() , 以及 carla::client::detail::Client::SubscribeToStream().
|
private |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
引用了 _on_tick_callbacks.
|
inline |
|
inline |
|
inline |
引用了 _on_tick_callbacks.
void carla::client::detail::Episode::SetPedestriansCrossFactor | ( | float | percentage | ) |
void carla::client::detail::Episode::SetPedestriansSeed | ( | unsigned int | seed | ) |
|
inline |
|
private |
被这些函数引用 GetActorById(), GetActors(), GetActorsById(), OnEpisodeStarted() , 以及 RegisterActor().
|
private |
被这些函数引用 GetActorById(), GetActors(), GetActorsById(), Listen() , 以及 ~Episode().
|
private |
|
private |
被这些函数引用 RegisterOnMapChangeEvent() , 以及 RemoveOnMapChangeEvent().
|
private |
被这些函数引用 OnEpisodeStarted(), RegisterOnTickEvent() , 以及 RemoveOnTickEvent().
|
private |
被这些函数引用 AddPendingException().
|
private |
被这些函数引用 AddPendingException().
|
private |
被这些函数引用 HasMapChangedSinceLastCall().
|
private |
被这些函数引用 CreateNavigationIfMissing().
|
private |
被这些函数引用 WaitForState().
|
private |
被这些函数引用 GetState().
|
private |
被这些函数引用 Listen() , 以及 ~Episode().
|
private |
被这些函数引用 CreateNavigationIfMissing() , 以及 OnEpisodeStarted().