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

#include <WorldSnapshot.h>

+ Collaboration diagram for carla::client::WorldSnapshot:

Public Member Functions

auto begin () const
 Return a begin iterator to the list of ActorSnapshots. More...
 
bool Contains (ActorId actor_id) const
 Check if an actor is present in this snapshot. More...
 
auto end () const
 Return a past-the-end iterator to the list of ActorSnapshots. More...
 
boost::optional< ActorSnapshotFind (ActorId actor_id) const
 Find an ActorSnapshot by id. More...
 
size_t GetFrame () const
 
uint64_t GetId () const
 Get the id of the episode associated with this world. More...
 
const TimestampGetTimestamp () const
 Get timestamp of this snapshot. More...
 
bool operator!= (const WorldSnapshot &rhs) const
 
bool operator== (const WorldSnapshot &rhs) const
 
size_t size () const
 Return number of ActorSnapshots present in this WorldSnapshot. More...
 
 WorldSnapshot (std::shared_ptr< const detail::EpisodeState > state)
 

Private Attributes

std::shared_ptr< const detail::EpisodeState_state
 

Detailed Description

Definition at line 18 of file WorldSnapshot.h.

Constructor & Destructor Documentation

◆ WorldSnapshot()

carla::client::WorldSnapshot::WorldSnapshot ( std::shared_ptr< const detail::EpisodeState state)
inline

Definition at line 21 of file WorldSnapshot.h.

Member Function Documentation

◆ begin()

auto carla::client::WorldSnapshot::begin ( ) const
inline

Return a begin iterator to the list of ActorSnapshots.

Definition at line 54 of file WorldSnapshot.h.

References _state.

◆ Contains()

bool carla::client::WorldSnapshot::Contains ( ActorId  actor_id) const
inline

Check if an actor is present in this snapshot.

Definition at line 39 of file WorldSnapshot.h.

References _state.

◆ end()

auto carla::client::WorldSnapshot::end ( ) const
inline

Return a past-the-end iterator to the list of ActorSnapshots.

Definition at line 59 of file WorldSnapshot.h.

References _state.

◆ Find()

boost::optional<ActorSnapshot> carla::client::WorldSnapshot::Find ( ActorId  actor_id) const
inline

Find an ActorSnapshot by id.

Definition at line 44 of file WorldSnapshot.h.

References _state.

Referenced by carla::client::LaneInvasionCallback::Tick().

+ Here is the caller graph for this function:

◆ GetFrame()

size_t carla::client::WorldSnapshot::GetFrame ( ) const
inline

Definition at line 29 of file WorldSnapshot.h.

References carla::client::Timestamp::frame, and GetTimestamp().

Referenced by carla::client::LaneInvasionCallback::Tick().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetId()

uint64_t carla::client::WorldSnapshot::GetId ( ) const
inline

Get the id of the episode associated with this world.

Definition at line 25 of file WorldSnapshot.h.

References _state.

◆ GetTimestamp()

const Timestamp& carla::client::WorldSnapshot::GetTimestamp ( ) const
inline

Get timestamp of this snapshot.

Definition at line 34 of file WorldSnapshot.h.

References _state.

Referenced by GetFrame(), operator==(), carla::traffic_manager::ALSM::Reset(), carla::traffic_manager::TrafficManagerLocal::Run(), carla::client::LaneInvasionCallback::Tick(), carla::traffic_manager::TrafficLightStage::Update(), carla::traffic_manager::MotionPlanStage::Update(), and carla::traffic_manager::ALSM::Update().

+ Here is the caller graph for this function:

◆ operator!=()

bool carla::client::WorldSnapshot::operator!= ( const WorldSnapshot rhs) const
inline

Definition at line 67 of file WorldSnapshot.h.

◆ operator==()

bool carla::client::WorldSnapshot::operator== ( const WorldSnapshot rhs) const
inline

Definition at line 63 of file WorldSnapshot.h.

References GetTimestamp().

+ Here is the call graph for this function:

◆ size()

size_t carla::client::WorldSnapshot::size ( ) const
inline

Return number of ActorSnapshots present in this WorldSnapshot.

Definition at line 49 of file WorldSnapshot.h.

References _state.

Member Data Documentation

◆ _state

std::shared_ptr<const detail::EpisodeState> carla::client::WorldSnapshot::_state
private

Definition at line 73 of file WorldSnapshot.h.

Referenced by begin(), Contains(), end(), Find(), GetId(), GetTimestamp(), and size().


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