CARLA
 
载入中...
搜索中...
未找到
RoadInfoLaneHeight.h
浏览该文件的文档.
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#pragma once
8
9#include "carla/road/element/RoadInfo.h" // 包含RoadInfo基类的定义
10#include "carla/geom/CubicPolynomial.h" // 包含用于描述多项式曲线的CubicPolynomial类的定义
11
12namespace carla {
13namespace road {
14namespace element {
15
16 /// RoadInfoLaneHeight类是RoadInfo的派生类,用于表示车道的表面高度信息。
17 /// 它提供了一种简化的方法来描述车道表面相对于道路平面的偏移量,
18 /// 通过在车道轮廓的离散位置设置内部和外部偏移量。
19 ///
20 class RoadInfoLaneHeight final : public RoadInfo {
21 public:
22
23 RoadInfoLaneHeight( // 构造函数,初始化RoadInfoLaneHeight对象
24 double s, // s参数表示当前车道段相对于前一个车道段的位置
25 double inner, // inner参数表示车道内侧相对于道路平面的偏移量
26 double outer) // outer参数表示车道外侧相对于道路平面的偏移量
27 : RoadInfo(s), // 调用基类RoadInfo的构造函数,传递s参数
28 _inner(inner), // 初始化内部偏移量成员变量
29 _outer(outer) {} // 初始化外部偏移量成员变量
30
31 void AcceptVisitor(RoadInfoVisitor &v) final { // 实现基类中声明的虚函数AcceptVisitor,以支持访问者模式
32 v.Visit(*this); // 调用访问者对象的Visit方法,传入当前对象的引用
33 }
34
35 /// 获取内部偏移量的方法
36 double GetInner() const {
37 return _inner; // 返回内部偏移量成员变量的值
38 }
39
40 /// 获取外部偏移量的方法
41 double GetOuter() const {
42 return _outer; // 返回外部偏移量成员变量的值
43 }
44
45 private:
46
47 const double _inner; // 内部偏移量成员变量,表示车道内侧相对于道路平面的偏移量
48
49 const double _outer; // 外部偏移量成员变量,表示车道外侧相对于道路平面的偏移量
50 };
51
52} // namespace element
53} // namespace road
54} // namespace carla
RoadInfoLaneHeight类是RoadInfo的派生类,用于表示车道的表面高度信息。 它提供了一种简化的方法来描述车道表面相对于道路平面的偏移量, 通过在车道轮廓的离散位置设置内部和外部偏移量...
double GetInner() const
获取内部偏移量的方法
RoadInfoLaneHeight(double s, double inner, double outer)
double GetOuter() const
获取外部偏移量的方法
void AcceptVisitor(RoadInfoVisitor &v) final
CARLA模拟器的主命名空间。
Definition Carla.cpp:139