CARLA
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
carla::client::detail::EpisodeState Class Reference

Represents the state of all the actors of an episode at a given frame. More...

#include <EpisodeState.h>

+ Inheritance diagram for carla::client::detail::EpisodeState:
+ Collaboration diagram for carla::client::detail::EpisodeState:

Public Member Functions

auto begin () const
 
bool ContainsActorSnapshot (ActorId actor_id) const
 
auto end () const
 
 EpisodeState (uint64_t episode_id)
 
 EpisodeState (const sensor::data::RawEpisodeState &state)
 
auto GetActorIds () const
 
ActorSnapshot GetActorSnapshot (ActorId id) const
 
boost::optional< ActorSnapshotGetActorSnapshotIfPresent (ActorId id) const
 
auto GetEpisodeId () const
 
auto GetFrame () const
 
SimulationState GetsimulationState () const
 
const auto & GetTimestamp () const
 
bool HasMapChanged () const
 
bool IsLightUpdatePending () const
 
size_t size () const
 

Private Types

using SimulationState = sensor::s11n::EpisodeStateSerializer::SimulationState
 

Private Member Functions

template<typename T >
void CopyActorSnapshotIfPresent (ActorId id, T &value) const
 
- Private Member Functions inherited from carla::NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
NonCopyableoperator= (NonCopyable &&)=delete
 

Private Attributes

std::unordered_map< ActorId, ActorSnapshot_actors
 
const uint64_t _episode_id
 
geom::Vector3DInt _map_origin
 
SimulationState _simulation_state
 
const Timestamp _timestamp
 

Detailed Description

Represents the state of all the actors of an episode at a given frame.

Definition at line 27 of file EpisodeState.h.

Member Typedef Documentation

◆ SimulationState

Definition at line 31 of file EpisodeState.h.

Constructor & Destructor Documentation

◆ EpisodeState() [1/2]

carla::client::detail::EpisodeState::EpisodeState ( uint64_t  episode_id)
inlineexplicit

Definition at line 35 of file EpisodeState.h.

◆ EpisodeState() [2/2]

carla::client::detail::EpisodeState::EpisodeState ( const sensor::data::RawEpisodeState state)
explicit

Definition at line 13 of file EpisodeState.cpp.

References _actors, DEBUG_ASSERT, DEBUG_ONLY, and carla::sensor::data::Array< T >::size().

+ Here is the call graph for this function:

Member Function Documentation

◆ begin()

auto carla::client::detail::EpisodeState::begin ( ) const
inline

Definition at line 89 of file EpisodeState.h.

References _actors, and carla::iterator::make_map_values_const_iterator().

+ Here is the call graph for this function:

◆ ContainsActorSnapshot()

bool carla::client::detail::EpisodeState::ContainsActorSnapshot ( ActorId  actor_id) const
inline

Definition at line 63 of file EpisodeState.h.

References _actors.

Referenced by carla::client::detail::WalkerNavigation::CheckIfWalkerExist().

+ Here is the caller graph for this function:

◆ CopyActorSnapshotIfPresent()

template<typename T >
void carla::client::detail::EpisodeState::CopyActorSnapshotIfPresent ( ActorId  id,
T &  value 
) const
inlineprivate

Definition at line 100 of file EpisodeState.h.

References _actors.

Referenced by GetActorSnapshot(), and GetActorSnapshotIfPresent().

+ Here is the caller graph for this function:

◆ end()

auto carla::client::detail::EpisodeState::end ( ) const
inline

Definition at line 93 of file EpisodeState.h.

References _actors, and carla::iterator::make_map_values_const_iterator().

+ Here is the call graph for this function:

◆ GetActorIds()

auto carla::client::detail::EpisodeState::GetActorIds ( ) const
inline

Definition at line 79 of file EpisodeState.h.

References _actors, carla::iterator::make_map_keys_const_iterator(), and carla::MakeListView().

+ Here is the call graph for this function:

◆ GetActorSnapshot()

ActorSnapshot carla::client::detail::EpisodeState::GetActorSnapshot ( ActorId  id) const
inline

Definition at line 67 of file EpisodeState.h.

References CopyActorSnapshotIfPresent().

+ Here is the call graph for this function:

◆ GetActorSnapshotIfPresent()

boost::optional<ActorSnapshot> carla::client::detail::EpisodeState::GetActorSnapshotIfPresent ( ActorId  id) const
inline

Definition at line 73 of file EpisodeState.h.

References CopyActorSnapshotIfPresent().

+ Here is the call graph for this function:

◆ GetEpisodeId()

auto carla::client::detail::EpisodeState::GetEpisodeId ( ) const
inline

Definition at line 39 of file EpisodeState.h.

References _episode_id.

◆ GetFrame()

auto carla::client::detail::EpisodeState::GetFrame ( ) const
inline

Definition at line 43 of file EpisodeState.h.

References _timestamp, and carla::client::Timestamp::frame.

◆ GetsimulationState()

SimulationState carla::client::detail::EpisodeState::GetsimulationState ( ) const
inline

Definition at line 51 of file EpisodeState.h.

References _simulation_state.

◆ GetTimestamp()

const auto& carla::client::detail::EpisodeState::GetTimestamp ( ) const
inline

Definition at line 47 of file EpisodeState.h.

References _timestamp.

Referenced by carla::nav::Navigation::UpdateCrowd().

+ Here is the caller graph for this function:

◆ HasMapChanged()

bool carla::client::detail::EpisodeState::HasMapChanged ( ) const
inline

Definition at line 55 of file EpisodeState.h.

References _simulation_state.

◆ IsLightUpdatePending()

bool carla::client::detail::EpisodeState::IsLightUpdatePending ( ) const
inline

Definition at line 59 of file EpisodeState.h.

References _simulation_state.

◆ size()

size_t carla::client::detail::EpisodeState::size ( ) const
inline

Definition at line 85 of file EpisodeState.h.

References _actors.

Member Data Documentation

◆ _actors

std::unordered_map<ActorId, ActorSnapshot> carla::client::detail::EpisodeState::_actors
private

◆ _episode_id

const uint64_t carla::client::detail::EpisodeState::_episode_id
private

Definition at line 107 of file EpisodeState.h.

Referenced by GetEpisodeId().

◆ _map_origin

geom::Vector3DInt carla::client::detail::EpisodeState::_map_origin
private

Definition at line 111 of file EpisodeState.h.

◆ _simulation_state

SimulationState carla::client::detail::EpisodeState::_simulation_state
private

Definition at line 113 of file EpisodeState.h.

Referenced by GetsimulationState(), HasMapChanged(), and IsLightUpdatePending().

◆ _timestamp

const Timestamp carla::client::detail::EpisodeState::_timestamp
private

Definition at line 109 of file EpisodeState.h.

Referenced by GetFrame(), and GetTimestamp().


The documentation for this class was generated from the following files: