CARLA
载入中...
搜索中...
未找到
LibCarla
source
carla
client
client/Junction.h
浏览该文件的文档.
1
// Copyright (c) 2020 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
#pragma once
8
9
#include "
carla/Memory.h
"
// 引入内存管理相关的头文件
10
#include "
carla/NonCopyable.h
"
// 引入不可复制类的头文件
11
#include "
carla/road/Junction.h
"
// 引入道路交叉口的相关定义
12
#include "
carla/road/RoadTypes.h
"
// 引入道路交叉口的相关定义
13
#include "
carla/geom/BoundingBox.h
"
// 引入边界框的相关定义
14
#include "
carla/client/Waypoint.h
"
// 引入路径点的相关定义
15
16
#include <vector>
// 引入标准库中的向量容器
17
18
19
namespace
carla
{
// 定义carla命名空间
20
namespace
client
{
// 定义client命名空间
21
22
class
Map
;
// 前向声明Map类
23
24
class
Junction
// 定义Junction类
25
:
public
EnableSharedFromThis
<Junction>,
// 允许共享自身的指针
26
private
NonCopyable
// 禁止拷贝构造
27
{
28
public
:
29
30
carla::road::JuncId
GetId
()
const
{
// 获取交叉口ID
31
return
_id
;
// 返回交叉口ID
32
}
33
34
std::vector<std::pair<SharedPtr<Waypoint>,
SharedPtr<Waypoint>
>>
GetWaypoints
(
// 获取路径点
35
road::Lane::LaneType
type =
road::Lane::LaneType::Driving
)
const
;
// 默认类型为行驶道
36
37
geom::BoundingBox
GetBoundingBox
()
const
;
// 获取交叉口的边界框
38
39
private
:
40
41
friend
class
Map
;
// 声明Map类为友元类,允许其访问私有成员
42
43
Junction
(
SharedPtr<const Map>
parent,
const
road::Junction
*junction);
// 构造函数
44
45
SharedPtr<const Map>
_parent
;
// 父地图的共享指针
46
47
geom::BoundingBox
_bounding_box
;
// 交叉口的边界框
48
49
road::JuncId
_id
;
// 交叉口ID
50
};
51
52
}
// namespace client
53
}
// namespace carla
NonCopyable.h
BoundingBox.h
Memory.h
RoadTypes.h
EnableSharedFromThis
Map
地图类的前向声明,用于在LaneInvasionSensor类中可能的引用。
carla::NonCopyable
这个类用于禁止拷贝和移动构造函数及赋值操作
Definition
LibCarla/source/carla/NonCopyable.h:12
carla::client::Junction
Definition
client/Junction.h:27
carla::client::Junction::GetWaypoints
std::vector< std::pair< SharedPtr< Waypoint >, SharedPtr< Waypoint > > > GetWaypoints(road::Lane::LaneType type=road::Lane::LaneType::Driving) const
Definition
Junction.cpp:19
carla::client::Junction::GetBoundingBox
geom::BoundingBox GetBoundingBox() const
Definition
Junction.cpp:24
carla::client::Junction::GetId
carla::road::JuncId GetId() const
Definition
client/Junction.h:30
carla::client::Junction::_bounding_box
geom::BoundingBox _bounding_box
Definition
client/Junction.h:47
carla::client::Junction::_parent
SharedPtr< const Map > _parent
Definition
client/Junction.h:45
carla::client::Junction::_id
road::JuncId _id
Definition
client/Junction.h:49
carla::geom::BoundingBox
Definition
LibCarla/source/carla/geom/BoundingBox.h:35
carla::road::Junction
Definition
road/Junction.h:24
carla::road::Lane::LaneType
LaneType
可以作为标志使用
Definition
Lane.h:29
carla::road::Lane::LaneType::Driving
@ Driving
Waypoint.h
carla::road::JuncId
int32_t JuncId
Definition
RoadTypes.h:23
carla::traffic_manager::Junction
carla::SharedPtr< carla::client::Junction > Junction
Definition
DataStructures.h:30
carla
CARLA模拟器的主命名空间。
Definition
Carla.cpp:139
carla::SharedPtr
boost::shared_ptr< T > SharedPtr
使用这个SharedPtr(boost::shared_ptr)以保持与boost::python的兼容性, 但未来如果可能的话,我们希望能为std::shared_ptr制作一个Python适配器。
Definition
Memory.h:19
client
包含CARLA客户端相关类和函数的命名空间。
Junction.h
制作者
1.10.0