This class holds the state of all the vehicles in the simlation. More...
#include <SimulationState.h>
Private Attributes | |
std::unordered_set< ActorId > | actor_set |
KinematicStateMap | kinematic_state_map |
StaticAttributeMap | static_attribute_map |
TrafficLightStateMap | tl_state_map |
This class holds the state of all the vehicles in the simlation.
Definition at line 43 of file SimulationState.h.
carla::traffic_manager::SimulationState::SimulationState | ( | ) |
Definition at line 7 of file SimulationState.cpp.
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::UpdateData(), and carla::traffic_manager::ALSM::UpdateUnregisteredActorsData().
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::UpdateData(), and carla::traffic_manager::ALSM::UpdateUnregisteredActorsData().
cg::Vector3D carla::traffic_manager::SimulationState::GetDimensions | ( | const ActorId | actor_id | ) | const |
Definition at line 97 of file SimulationState.cpp.
References carla::traffic_manager::StaticAttributes::half_height, carla::traffic_manager::StaticAttributes::half_length, carla::traffic_manager::StaticAttributes::half_width, and static_attribute_map.
Referenced by carla::traffic_manager::CollisionStage::GetBoundary(), carla::traffic_manager::CollisionStage::GetGeodesicBoundary(), carla::traffic_manager::CollisionStage::NegotiateCollision(), and carla::traffic_manager::CollisionStage::Update().
cg::Vector3D carla::traffic_manager::SimulationState::GetHeading | ( | const ActorId | actor_id | ) | const |
Definition at line 69 of file SimulationState.cpp.
References kinematic_state_map.
Referenced by carla::traffic_manager::LocalizationStage::ComputeActionBuffer(), carla::traffic_manager::LocalizationStage::ComputeNextAction(), carla::traffic_manager::CollisionStage::GetBoundary(), carla::traffic_manager::CollisionStage::GetBoundingBoxExtention(), carla::traffic_manager::CollisionStage::NegotiateCollision(), carla::traffic_manager::LocalizationStage::Update(), and carla::traffic_manager::MotionPlanStage::Update().
cg::Location carla::traffic_manager::SimulationState::GetHeroLocation | ( | const ActorId | actor_id | ) | const |
cg::Location carla::traffic_manager::SimulationState::GetHybridEndLocation | ( | const ActorId | actor_id | ) | const |
Definition at line 61 of file SimulationState.cpp.
References kinematic_state_map.
Referenced by carla::traffic_manager::ALSM::UpdateData().
cg::Location carla::traffic_manager::SimulationState::GetLocation | ( | const ActorId | actor_id | ) | const |
Definition at line 57 of file SimulationState.cpp.
References kinematic_state_map.
Referenced by carla::traffic_manager::LocalizationStage::ComputeActionBuffer(), carla::traffic_manager::LocalizationStage::ComputeNextAction(), carla::traffic_manager::CollisionStage::GetBoundary(), carla::traffic_manager::CollisionStage::NegotiateCollision(), carla::traffic_manager::MotionPlanStage::SafeAfterJunction(), carla::traffic_manager::LocalizationStage::Update(), carla::traffic_manager::MotionPlanStage::Update(), carla::traffic_manager::CollisionStage::Update(), and carla::traffic_manager::ALSM::UpdateData().
cg::Rotation carla::traffic_manager::SimulationState::GetRotation | ( | const ActorId | actor_id | ) | const |
Definition at line 65 of file SimulationState.cpp.
References kinematic_state_map.
Referenced by carla::traffic_manager::MotionPlanStage::Update().
float carla::traffic_manager::SimulationState::GetSpeedLimit | ( | const ActorId | actor_id | ) | const |
Definition at line 77 of file SimulationState.cpp.
References kinematic_state_map.
Referenced by carla::traffic_manager::MotionPlanStage::Update().
TrafficLightState carla::traffic_manager::SimulationState::GetTLS | ( | const ActorId | actor_id | ) | const |
Definition at line 89 of file SimulationState.cpp.
References tl_state_map.
Referenced by carla::traffic_manager::ALSM::IsVehicleStuck(), carla::traffic_manager::CollisionStage::NegotiateCollision(), carla::traffic_manager::TrafficLightStage::Update(), and UpdateTrafficLightState().
Definition at line 93 of file SimulationState.cpp.
References static_attribute_map.
Referenced by carla::traffic_manager::CollisionStage::GetBoundary(), and carla::traffic_manager::CollisionStage::Update().
cg::Vector3D carla::traffic_manager::SimulationState::GetVelocity | ( | const ActorId | actor_id | ) | const |
Definition at line 73 of file SimulationState.cpp.
References kinematic_state_map.
Referenced by carla::traffic_manager::MotionPlanStage::CollisionHandling(), carla::traffic_manager::CollisionStage::GetBoundary(), carla::traffic_manager::CollisionStage::GetBoundingBoxExtention(), carla::traffic_manager::TrafficLightStage::HandleNonSignalisedJunction(), carla::traffic_manager::MotionPlanStage::SafeAfterJunction(), carla::traffic_manager::LocalizationStage::Update(), carla::traffic_manager::MotionPlanStage::Update(), carla::traffic_manager::CollisionStage::Update(), carla::traffic_manager::ALSM::UpdateData(), and carla::traffic_manager::ALSM::UpdateIdleTime().
bool carla::traffic_manager::SimulationState::IsDormant | ( | const ActorId | actor_id | ) | const |
Definition at line 85 of file SimulationState.cpp.
References kinematic_state_map.
Referenced by carla::traffic_manager::TrafficLightStage::Update(), and carla::traffic_manager::MotionPlanStage::Update().
bool carla::traffic_manager::SimulationState::IsPhysicsEnabled | ( | const ActorId | actor_id | ) | const |
Definition at line 81 of file SimulationState.cpp.
References kinematic_state_map.
Referenced by carla::traffic_manager::MotionPlanStage::Update(), and carla::traffic_manager::ALSM::UpdateData().
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().
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().
void carla::traffic_manager::SimulationState::UpdateKinematicHybridEndLocation | ( | ActorId | actor_id, |
cg::Location | location | ||
) |
Definition at line 41 of file SimulationState.cpp.
References kinematic_state_map.
Referenced by carla::traffic_manager::MotionPlanStage::Update().
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::MotionPlanStage::Update(), carla::traffic_manager::ALSM::UpdateData(), and carla::traffic_manager::ALSM::UpdateUnregisteredActorsData().
void carla::traffic_manager::SimulationState::UpdateTrafficLightState | ( | ActorId | actor_id, |
TrafficLightState | state | ||
) |
Definition at line 45 of file SimulationState.cpp.
References GetTLS(), carla::rpc::Green, carla::traffic_manager::TrafficLightState::tl_state, and tl_state_map.
Referenced by carla::traffic_manager::ALSM::UpdateData(), and carla::traffic_manager::ALSM::UpdateUnregisteredActorsData().
|
private |
Definition at line 47 of file SimulationState.h.
Referenced by AddActor(), ContainsActor(), RemoveActor(), and Reset().
|
private |
Definition at line 49 of file SimulationState.h.
Referenced by AddActor(), GetHeading(), GetHybridEndLocation(), GetLocation(), GetRotation(), GetSpeedLimit(), GetVelocity(), IsDormant(), IsPhysicsEnabled(), RemoveActor(), Reset(), UpdateKinematicHybridEndLocation(), and UpdateKinematicState().
|
private |
Definition at line 51 of file SimulationState.h.
Referenced by AddActor(), GetDimensions(), GetType(), RemoveActor(), and Reset().
|
private |
Definition at line 53 of file SimulationState.h.
Referenced by AddActor(), GetTLS(), RemoveActor(), Reset(), and UpdateTrafficLightState().