CARLA
 
载入中...
搜索中...
未找到
Object.h
浏览该文件的文档.
1// Copyright (c) 2019 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#include "carla/NonCopyable.h" // 引入不可拷贝类的头文件
9#include "carla/road/RoadTypes.h" // 引入道路类型的头文件
10
11#include <string> // 引入字符串库
12
13namespace carla { // 定义 carla 命名空间
14namespace road { // 定义 road 命名空间
15
16 class Object : private MovableNonCopyable { // 定义 Object 类,继承自 MovableNonCopyable(不可拷贝但可移动)
17 public:
18
19 Object() = default; // 默认构造函数
20
21 private:
22
23 ObjId _id = 0u; // 对象 ID,初始化为 0
24 std::string _type; // 对象类型
25 std::string _name; // 对象名称
26 double _s = 0.0; // 对象在路径上的位置(s坐标),初始化为 0.0
27 double _t = 0.0; // 对象的横向位置(t坐标),初始化为 0.0
28 double _zOffset = 0.0; // 对象的 Z 轴偏移量,初始化为 0.0
29 double _validLength = 0.0; // 对象的有效长度,初始化为 0.0
30 std::string _orientation; // 对象的朝向
31 double _lenght = 0.0; // 对象的长度,初始化为 0.0(注意:变量名拼写错误,应为 '_length')
32 double _width = 0.0; // 对象的宽度,初始化为 0.0
33 double _hdg = 0.0; // 对象的航向角,初始化为 0.0
34 double _pitch = 0.0; // 对象的俯仰角,初始化为 0.0
35 double _roll = 0.0; // 对象的滚转角,初始化为 0.0
36 };
37
38} // road
39} // carla
这个类用于禁止拷贝构造函数和赋值操作,但允许移动构造函数和赋值操作
std::string _name
Definition Object.h:25
std::string _type
Definition Object.h:24
std::string _orientation
Definition Object.h:30
double _validLength
Definition Object.h:29
uint32_t ObjId
Definition RoadTypes.h:32
CARLA模拟器的主命名空间。
Definition Carla.cpp:139