CARLA
 
载入中...
搜索中...
未找到
TrafficSign.cpp
浏览该文件的文档.
1// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#include "carla/client/TrafficSign.h" // 包含 TrafficSign 类的头文件
8#include "carla/client/detail/Simulator.h" // 包含 Simulator 类的详细实现的头文件
9#include "carla/client/ActorList.h" // 包含 ActorList 类的头文件
10
11namespace carla { // 开始 carla 命名空间
12namespace client { // 开始 client 命名空间
13 // 定义 TrafficSign 类的成员函数 GetSignId
14 carla::road::SignId TrafficSign::GetSignId() const { // 返回当前交通标志的标识符,从当前剧集获取相关的交通灯数据
15 return std::string(GetEpisode().Lock()->GetActorSnapshot(*this).state.traffic_light_data.sign_id);
16 }
17
18} // namespace client
19} // namespace carla
carla::road::SignId GetSignId() const
std::string SignId
Definition RoadTypes.h:35
CARLA模拟器的主命名空间。
Definition Carla.cpp:139
包含CARLA客户端相关类和函数的命名空间。