CARLA
 
载入中...
搜索中...
未找到
Public 成员函数 | Private 成员函数 | Private 属性 | 所有成员列表
carla::client::detail::Episode类 参考

持有当前剧集及当前剧集状态 更多...

#include <Episode.h>

+ 类 carla::client::detail::Episode 继承关系图:
+ carla::client::detail::Episode 的协作图:

Public 成员函数

void AddPendingException (std::string e)
 
std::shared_ptr< WalkerNavigationCreateNavigationIfMissing ()
 
 Episode (Client &client, std::weak_ptr< Simulator > simulator)
 
auto GetId () const
 
boost::optional< rpc::ActorGetParticipantById (ActorId id)
 
std::vector< rpc::ActorGetParticipants ()
 
std::vector< rpc::ActorGetParticipantsById (const std::vector< ActorId > &actor_ids)
 
std::shared_ptr< const EpisodeStateGetState () const
 
bool HasMapChangedSinceLastCall ()
 
void Listen ()
 
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 RegisterParticipant (rpc::Actor actor)
 
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< WorldSnapshotWaitForState (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
 
NonCopyableoperator= (const NonCopyable &)=delete
 
NonCopyableoperator= (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
 

详细描述

持有当前剧集及当前剧集状态

每当接收到世界 tick 时,剧集状态在后台变化。 如果模拟器加载了新剧集,剧集可能会随任何后台更新而变化。

在文件 Episode.h33 行定义.

构造及析构函数说明

◆ Episode() [1/2]

carla::client::detail::Episode::Episode ( Client & client,
std::weak_ptr< Simulator > simulator )
explicit

在文件 Episode.cpp41 行定义.

◆ ~Episode()

carla::client::detail::Episode::~Episode ( )

在文件 Episode.cpp50 行定义.

引用了 _client, _token, carla::log_error() , 以及 carla::client::detail::Client::UnSubscribeFromStream().

+ 函数调用图:

◆ Episode() [2/2]

carla::client::detail::Episode::Episode ( Client & client,
const rpc::EpisodeInfo & info,
std::weak_ptr< Simulator > simulator )
private

在文件 Episode.cpp44 行定义.

成员函数说明

◆ AddPendingException()

void carla::client::detail::Episode::AddPendingException ( std::string e)
inline

在文件 Episode.h94 行定义.

引用了 _pending_exceptions , 以及 _pending_exceptions_msg.

◆ CreateNavigationIfMissing()

std::shared_ptr< WalkerNavigation > carla::client::detail::Episode::CreateNavigationIfMissing ( )

在文件 Episode.cpp174 行定义.

引用了 _simulator , 以及 _walker_navigation.

◆ GetId()

auto carla::client::detail::Episode::GetId ( ) const
inline

在文件 Episode.h44 行定义.

引用了 GetState().

+ 函数调用图:

◆ GetParticipantById()

boost::optional< rpc::Actor > carla::client::detail::Episode::GetParticipantById ( ActorId id)

◆ GetParticipants()

std::vector< rpc::Actor > carla::client::detail::Episode::GetParticipants ( )

◆ GetParticipantsById()

std::vector< rpc::Actor > carla::client::detail::Episode::GetParticipantsById ( const std::vector< ActorId > & actor_ids)

◆ GetState()

std::shared_ptr< const EpisodeState > carla::client::detail::Episode::GetState ( ) const
inline

在文件 Episode.h48 行定义.

引用了 _state.

被这些函数引用 GetId() , 以及 carla::client::detail::SynchronizeFrame().

+ 这是这个函数的调用关系图:

◆ HasMapChangedSinceLastCall()

bool carla::client::detail::Episode::HasMapChangedSinceLastCall ( )

在文件 Episode.cpp165 行定义.

引用了 _should_update_map.

◆ Listen()

void carla::client::detail::Episode::Listen ( )

检查待处理的异常(主要是交通管理服务器关闭)

将待处理的异常标记为 false

为错误消息创建异常

传感器案例:数据不一致

Episode 改变

在文件 Episode.cpp58 行定义.

引用了 _client, _token, carla::client::detail::CastData(), carla::sensor::Deserializer::Deserialize() , 以及 carla::client::detail::Client::SubscribeToStream().

+ 函数调用图:

◆ OnEpisodeChanged()

void carla::client::detail::Episode::OnEpisodeChanged ( )
private

在文件 Episode.cpp159 行定义.

引用了 carla::traffic_manager::TrafficManager::Reset().

+ 函数调用图:

◆ OnEpisodeStarted()

void carla::client::detail::Episode::OnEpisodeStarted ( )
private

在文件 Episode.cpp151 行定义.

引用了 _actors, _on_tick_callbacks, _walker_navigation, carla::client::detail::CachedActorList::Clear() , 以及 carla::traffic_manager::TrafficManager::Release().

+ 函数调用图:

◆ RegisterLightUpdateChangeEvent()

size_t carla::client::detail::Episode::RegisterLightUpdateChangeEvent ( std::function< void(WorldSnapshot)> callback)
inline

在文件 Episode.h82 行定义.

引用了 _on_light_update_callbacks.

◆ RegisterOnMapChangeEvent()

size_t carla::client::detail::Episode::RegisterOnMapChangeEvent ( std::function< void(WorldSnapshot)> callback)
inline

在文件 Episode.h74 行定义.

引用了 _on_map_change_callbacks.

◆ RegisterOnTickEvent()

size_t carla::client::detail::Episode::RegisterOnTickEvent ( std::function< void(WorldSnapshot)> callback)
inline

在文件 Episode.h66 行定义.

引用了 _on_tick_callbacks.

◆ RegisterParticipant()

void carla::client::detail::Episode::RegisterParticipant ( rpc::Actor actor)
inline

在文件 Episode.h52 行定义.

引用了 _actors , 以及 carla::client::detail::CachedActorList::Insert().

+ 函数调用图:

◆ RemoveLightUpdateChangeEvent()

void carla::client::detail::Episode::RemoveLightUpdateChangeEvent ( size_t id)
inline

在文件 Episode.h86 行定义.

引用了 _on_light_update_callbacks.

◆ RemoveOnMapChangeEvent()

void carla::client::detail::Episode::RemoveOnMapChangeEvent ( size_t id)
inline

在文件 Episode.h78 行定义.

引用了 _on_map_change_callbacks.

◆ RemoveOnTickEvent()

void carla::client::detail::Episode::RemoveOnTickEvent ( size_t id)
inline

在文件 Episode.h70 行定义.

引用了 _on_tick_callbacks.

◆ SetPedestriansCrossFactor()

void carla::client::detail::Episode::SetPedestriansCrossFactor ( float percentage)

◆ SetPedestriansSeed()

void carla::client::detail::Episode::SetPedestriansSeed ( unsigned int seed)

◆ WaitForState()

boost::optional< WorldSnapshot > carla::client::detail::Episode::WaitForState ( time_duration timeout)
inline

在文件 Episode.h62 行定义.

引用了 _snapshot.

类成员变量说明

◆ _actors

CachedActorList carla::client::detail::Episode::_actors
private

在文件 Episode.h117 行定义.

被这些函数引用 OnEpisodeStarted() , 以及 RegisterParticipant().

◆ _client

Client& carla::client::detail::Episode::_client
private

在文件 Episode.h111 行定义.

被这些函数引用 Listen() , 以及 ~Episode().

◆ _on_light_update_callbacks

CallbackList<WorldSnapshot> carla::client::detail::Episode::_on_light_update_callbacks
private

在文件 Episode.h123 行定义.

被这些函数引用 RegisterLightUpdateChangeEvent() , 以及 RemoveLightUpdateChangeEvent().

◆ _on_map_change_callbacks

CallbackList<WorldSnapshot> carla::client::detail::Episode::_on_map_change_callbacks
private

在文件 Episode.h121 行定义.

被这些函数引用 RegisterOnMapChangeEvent() , 以及 RemoveOnMapChangeEvent().

◆ _on_tick_callbacks

CallbackList<WorldSnapshot> carla::client::detail::Episode::_on_tick_callbacks
private

在文件 Episode.h119 行定义.

被这些函数引用 OnEpisodeStarted(), RegisterOnTickEvent() , 以及 RemoveOnTickEvent().

◆ _pending_exceptions

bool carla::client::detail::Episode::_pending_exceptions = false
private

在文件 Episode.h131 行定义.

被这些函数引用 AddPendingException().

◆ _pending_exceptions_msg

std::string carla::client::detail::Episode::_pending_exceptions_msg
private

在文件 Episode.h115 行定义.

被这些函数引用 AddPendingException().

◆ _should_update_map

bool carla::client::detail::Episode::_should_update_map = true
private

在文件 Episode.h133 行定义.

被这些函数引用 HasMapChangedSinceLastCall().

◆ _simulator

std::weak_ptr<Simulator> carla::client::detail::Episode::_simulator
private

在文件 Episode.h135 行定义.

被这些函数引用 CreateNavigationIfMissing().

◆ _snapshot

RecurrentSharedFuture<WorldSnapshot> carla::client::detail::Episode::_snapshot
private

在文件 Episode.h125 行定义.

被这些函数引用 WaitForState().

◆ _state

AtomicSharedPtr<const EpisodeState> carla::client::detail::Episode::_state
private

在文件 Episode.h113 行定义.

被这些函数引用 GetState().

◆ _token

const streaming::Token carla::client::detail::Episode::_token
private

在文件 Episode.h129 行定义.

被这些函数引用 Listen() , 以及 ~Episode().

◆ _walker_navigation

AtomicSharedPtr<WalkerNavigation> carla::client::detail::Episode::_walker_navigation
private

在文件 Episode.h127 行定义.

被这些函数引用 CreateNavigationIfMissing() , 以及 OnEpisodeStarted().


该类的文档由以下文件生成: