CARLA
Public Member Functions | Private Attributes | List of all members
carla::traffic_manager::SimulationState Class Reference

This class holds the state of all the vehicles in the simlation. More...

#include <SimulationState.h>

+ Collaboration diagram for carla::traffic_manager::SimulationState:

Public Member Functions

void AddActor (ActorId actor_id, KinematicState kinematic_state, StaticAttributes attributes, TrafficLightState tl_state)
 
bool ContainsActor (ActorId actor_id) const
 
cg::Vector3D GetDimensions (const ActorId actor_id) const
 
cg::Vector3D GetHeading (const ActorId actor_id) const
 
cg::Location GetLocation (const ActorId actor_id) const
 
cg::Rotation GetRotation (const ActorId actor_id) const
 
float GetSpeedLimit (const ActorId actor_id) const
 
TrafficLightState GetTLS (const ActorId actor_id) const
 
ActorType GetType (const ActorId actor_id) const
 
cg::Vector3D GetVelocity (const ActorId actor_id) const
 
bool IsPhysicsEnabled (const ActorId actor_id) const
 
void RemoveActor (ActorId actor_id)
 
void Reset ()
 
 SimulationState ()
 
void UpdateKinematicState (ActorId actor_id, KinematicState state)
 
void UpdateTrafficLightState (ActorId actor_id, TrafficLightState state)
 

Private Attributes

std::unordered_set< ActorIdactor_set
 
KinematicStateMap kinematic_state_map
 
StaticAttributeMap static_attribute_map
 
TrafficLightStateMap tl_state_map
 

Detailed Description

This class holds the state of all the vehicles in the simlation.

Definition at line 41 of file SimulationState.h.

Constructor & Destructor Documentation

◆ SimulationState()

carla::traffic_manager::SimulationState::SimulationState ( )

Definition at line 7 of file SimulationState.cpp.

Member Function Documentation

◆ AddActor()

void carla::traffic_manager::SimulationState::AddActor ( ActorId  actor_id,
KinematicState  kinematic_state,
StaticAttributes  attributes,
TrafficLightState  tl_state 
)

Definition at line 9 of file SimulationState.cpp.

References actor_set, kinematic_state_map, static_attribute_map, and tl_state_map.

Referenced by carla::traffic_manager::ALSM::UpdateRegisteredActorsData(), and carla::traffic_manager::ALSM::UpdateUnregisteredActorsData().

+ Here is the caller graph for this function:

◆ ContainsActor()

bool carla::traffic_manager::SimulationState::ContainsActor ( ActorId  actor_id) const

Definition at line 19 of file SimulationState.cpp.

References actor_set.

Referenced by carla::traffic_manager::CollisionStage::Update(), carla::traffic_manager::ALSM::UpdateRegisteredActorsData(), and carla::traffic_manager::ALSM::UpdateUnregisteredActorsData().

+ Here is the caller graph for this function:

◆ GetDimensions()

cg::Vector3D carla::traffic_manager::SimulationState::GetDimensions ( const ActorId  actor_id) const

◆ GetHeading()

cg::Vector3D carla::traffic_manager::SimulationState::GetHeading ( const ActorId  actor_id) const

Definition at line 53 of file SimulationState.cpp.

References kinematic_state_map.

Referenced by carla::traffic_manager::CollisionStage::GetBoundary(), carla::traffic_manager::CollisionStage::GetBoundingBoxExtention(), carla::traffic_manager::CollisionStage::NegotiateCollision(), carla::traffic_manager::MotionPlanStage::Update(), and carla::traffic_manager::LocalizationStage::Update().

+ Here is the caller graph for this function:

◆ GetLocation()

cg::Location carla::traffic_manager::SimulationState::GetLocation ( const ActorId  actor_id) const

◆ GetRotation()

cg::Rotation carla::traffic_manager::SimulationState::GetRotation ( const ActorId  actor_id) const

Definition at line 49 of file SimulationState.cpp.

References kinematic_state_map.

Referenced by carla::traffic_manager::MotionPlanStage::Update().

+ Here is the caller graph for this function:

◆ GetSpeedLimit()

float carla::traffic_manager::SimulationState::GetSpeedLimit ( const ActorId  actor_id) const

Definition at line 61 of file SimulationState.cpp.

References kinematic_state_map.

Referenced by carla::traffic_manager::MotionPlanStage::Update().

+ Here is the caller graph for this function:

◆ GetTLS()

TrafficLightState carla::traffic_manager::SimulationState::GetTLS ( const ActorId  actor_id) const

Definition at line 69 of file SimulationState.cpp.

References tl_state_map.

Referenced by carla::traffic_manager::ALSM::IsVehicleStuck(), carla::traffic_manager::CollisionStage::NegotiateCollision(), and carla::traffic_manager::TrafficLightStage::Update().

+ Here is the caller graph for this function:

◆ GetType()

ActorType carla::traffic_manager::SimulationState::GetType ( const ActorId  actor_id) const

Definition at line 73 of file SimulationState.cpp.

References static_attribute_map.

Referenced by carla::traffic_manager::CollisionStage::GetBoundary(), and carla::traffic_manager::CollisionStage::Update().

+ Here is the caller graph for this function:

◆ GetVelocity()

cg::Vector3D carla::traffic_manager::SimulationState::GetVelocity ( const ActorId  actor_id) const

◆ IsPhysicsEnabled()

bool carla::traffic_manager::SimulationState::IsPhysicsEnabled ( const ActorId  actor_id) const

Definition at line 65 of file SimulationState.cpp.

References kinematic_state_map.

Referenced by carla::traffic_manager::MotionPlanStage::Update().

+ Here is the caller graph for this function:

◆ RemoveActor()

void carla::traffic_manager::SimulationState::RemoveActor ( ActorId  actor_id)

Definition at line 23 of file SimulationState.cpp.

References actor_set, kinematic_state_map, static_attribute_map, and tl_state_map.

Referenced by carla::traffic_manager::ALSM::RemoveActor().

+ Here is the caller graph for this function:

◆ Reset()

void carla::traffic_manager::SimulationState::Reset ( void  )

Definition at line 30 of file SimulationState.cpp.

References actor_set, kinematic_state_map, static_attribute_map, and tl_state_map.

Referenced by carla::traffic_manager::TrafficManagerLocal::Stop().

+ Here is the caller graph for this function:

◆ UpdateKinematicState()

void carla::traffic_manager::SimulationState::UpdateKinematicState ( ActorId  actor_id,
KinematicState  state 
)

Definition at line 37 of file SimulationState.cpp.

References kinematic_state_map.

Referenced by carla::traffic_manager::ALSM::UpdateRegisteredActorsData(), and carla::traffic_manager::ALSM::UpdateUnregisteredActorsData().

+ Here is the caller graph for this function:

◆ UpdateTrafficLightState()

void carla::traffic_manager::SimulationState::UpdateTrafficLightState ( ActorId  actor_id,
TrafficLightState  state 
)

Definition at line 41 of file SimulationState.cpp.

References tl_state_map.

Referenced by carla::traffic_manager::ALSM::UpdateRegisteredActorsData(), and carla::traffic_manager::ALSM::UpdateUnregisteredActorsData().

+ Here is the caller graph for this function:

Member Data Documentation

◆ actor_set

std::unordered_set<ActorId> carla::traffic_manager::SimulationState::actor_set
private

Definition at line 45 of file SimulationState.h.

Referenced by AddActor(), ContainsActor(), RemoveActor(), and Reset().

◆ kinematic_state_map

KinematicStateMap carla::traffic_manager::SimulationState::kinematic_state_map
private

◆ static_attribute_map

StaticAttributeMap carla::traffic_manager::SimulationState::static_attribute_map
private

Definition at line 49 of file SimulationState.h.

Referenced by AddActor(), GetDimensions(), GetType(), RemoveActor(), and Reset().

◆ tl_state_map

TrafficLightStateMap carla::traffic_manager::SimulationState::tl_state_map
private

Definition at line 51 of file SimulationState.h.

Referenced by AddActor(), GetTLS(), RemoveActor(), Reset(), and UpdateTrafficLightState().


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