19 return GetEpisode().
Lock()->GetActorSnapshot(*this).state.traffic_light_data.state;
27 return GetEpisode().
Lock()->GetActorSnapshot(*this).state.traffic_light_data.green_time;
31 GetEpisode().
Lock()->SetTrafficLightYellowTime(*
this, yellow_time);
35 return GetEpisode().
Lock()->GetActorSnapshot(*this).state.traffic_light_data.yellow_time;
43 return GetEpisode().
Lock()->GetActorSnapshot(*this).state.traffic_light_data.red_time;
47 return GetEpisode().
Lock()->GetActorSnapshot(*this).state.traffic_light_data.elapsed_time;
56 return GetEpisode().
Lock()->GetActorSnapshot(*this).state.traffic_light_data.time_is_frozen;
61 return GetEpisode().
Lock()->GetActorSnapshot(*this).state.traffic_light_data.pole_index;
65 std::vector<SharedPtr<TrafficLight>> result;
69 result.push_back(std::static_pointer_cast<TrafficLight>(actor));
void SetGreenTime(float green_time)
void SetYellowTime(float yellow_time)
float GetElapsedTime() const
rpc::TrafficLightState GetState() const
Return the current state of the traffic light.
road::SignId GetOpenDRIVEID() const
std::vector< SharedPtr< TrafficLight > > GetGroupTrafficLights()
Return all traffic lights in the group this one belongs to.
void SetState(rpc::TrafficLightState state)
uint32_t GetPoleIndex()
Returns the index of the pole in the traffic light group.
std::vector< geom::BoundingBox > GetLightBoxes() const
float GetGreenTime() const
void SetRedTime(float red_time)
float GetYellowTime() const
carla::road::SignId GetSignId() const
SharedPtr< ActorList > GetActors() const
Return a list with all the actors currently present in the world.
EpisodeProxy & GetEpisode()
SharedPtrType Lock() const
Same as TryLock but never return nullptr.
This file contains definitions of common data structures used in traffic manager.
std::shared_ptr< T > SharedPtr