用于初始化 Actor 类。只有 ActorFactory 可以创建此对象,因此只有 ActorFactory 可以创建 Actor。
void SetGreenTime(float green_time)
void SetYellowTime(float yellow_time)
float GetElapsedTime() const
rpc::TrafficLightState GetState() const
返回交通灯的当前状态。
road::SignId GetOpenDRIVEID() const
std::vector< SharedPtr< TrafficLight > > GetGroupTrafficLights()
返回该交通灯所属组中的所有交通灯。
void SetState(rpc::TrafficLightState state)
uint32_t GetPoleIndex()
返回交通信号灯组中灯杆的索引 // 获取交通信号灯组中灯杆的索引值的函数,返回一个uint32_t类型的索引值,用于标识交通灯在所属灯组中的具体位置等相关信息
std::vector< geom::BoundingBox > GetLightBoxes() const
TrafficLight(ActorInitializer init)
std::vector< SharedPtr< Waypoint > > GetStopWaypoints() const
std::vector< SharedPtr< Waypoint > > GetAffectedLaneWaypoints() const
float GetGreenTime() const
void SetRedTime(float red_time)
float GetYellowTime() const