CARLA
载入中...
搜索中...
未找到
LibCarla
source
carla
client
Junction.cpp
浏览该文件的文档.
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
#include "
carla/client/Junction.h
"
// 引入Junction头文件
8
#include "
carla/client/Map.h
"
// 引入Map头文件
9
#include "
carla/road/element/Waypoint.h
"
// 引入Waypoint头文件
10
11
namespace
carla
{
// 定义carla命名空间
12
namespace
client
{
// 定义client子命名空间
13
14
Junction::Junction(
SharedPtr<const Map>
parent,
const
road::Junction
*junction) : _parent(parent) {
// Junction构造函数
15
_bounding_box
= junction->
GetBoundingBox
();
// 获取并存储交叉口的边界框
16
_id
= junction->
GetId
();
// 获取并存储交叉口的ID
17
}
18
19
std::vector<std::pair<SharedPtr<Waypoint>,
SharedPtr<Waypoint>
>> Junction::GetWaypoints(
// 获取交叉口的路点
20
road::Lane::LaneType
type)
const
{
// 输入参数:车道类型
21
return
_parent
->GetJunctionWaypoints(
GetId
(), type);
// 从父Map获取与交叉口相关的路点
22
}
23
24
geom::BoundingBox
Junction::GetBoundingBox()
const
{
// 获取交叉口的边界框
25
return
_bounding_box
;
// 返回存储的边界框
26
}
27
28
}
// namespace client
29
}
// namespace carla
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::Junction::GetId
JuncId GetId() const
Definition
road/Junction.h:60
carla::road::Junction::GetBoundingBox
carla::geom::BoundingBox GetBoundingBox() const
Definition
road/Junction.h:84
carla::road::Lane::LaneType
LaneType
可以作为标志使用
Definition
Lane.h:29
Junction.h
Map.h
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客户端相关类和函数的命名空间。
Waypoint.h
制作者
1.10.0