CARLA
载入中...
搜索中...
未找到
LibCarla
source
carla
rpc
WheelTelemetryData.h
浏览该文件的文档.
1
// Copyright (c) 2022 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/MsgPack.h
"
10
11
namespace
carla
{
12
namespace
rpc {
13
14
class
WheelTelemetryData
{
15
public
:
16
17
WheelTelemetryData
() =
default
;
18
19
WheelTelemetryData
(
20
float
tire_friction
,
21
float
lat_slip
,
22
float
long_slip
,
23
float
omega
,
24
float
tire_load
,
25
float
normalized_tire_load
,
26
float
torque
,
27
float
long_force
,
28
float
lat_force
,
29
float
normalized_long_force
,
30
float
normalized_lat_force
)
31
:
tire_friction
(
tire_friction
),
32
lat_slip
(
lat_slip
),
33
long_slip
(
long_slip
),
34
omega
(
omega
),
35
tire_load
(
tire_load
),
36
normalized_tire_load
(
normalized_tire_load
),
37
torque
(
torque
),
38
long_force
(
long_force
),
39
lat_force
(
lat_force
),
40
normalized_long_force
(
normalized_long_force
),
41
normalized_lat_force
(
normalized_lat_force
) {}
42
43
float
tire_friction
= 0.0f;
44
float
lat_slip
= 0.0f;
45
float
long_slip
= 0.0f;
46
float
omega
= 0.0f;
47
float
tire_load
= 0.0f;
48
float
normalized_tire_load
= 0.0f;
49
float
torque
= 0.0f;
50
float
long_force
= 0.0f;
51
float
lat_force
= 0.0f;
52
float
normalized_long_force
= 0.0f;
53
float
normalized_lat_force
= 0.0f;
54
55
bool
operator!=
(
const
WheelTelemetryData
&rhs)
const
{
56
return
57
tire_friction
!= rhs.
tire_friction
||
58
lat_slip
!= rhs.
lat_slip
||
59
long_slip
!= rhs.
long_slip
||
60
omega
!= rhs.
omega
||
61
tire_load
!= rhs.
tire_load
||
62
normalized_tire_load
!= rhs.
normalized_tire_load
||
63
torque
!= rhs.
torque
||
64
long_force
!= rhs.
long_force
||
65
lat_force
!= rhs.
lat_force
||
66
normalized_long_force
!= rhs.
normalized_long_force
||
67
normalized_lat_force
!= rhs.
normalized_lat_force
;
68
}
69
70
bool
operator==
(
const
WheelTelemetryData
&rhs)
const
{
71
return
!(*
this
!= rhs);
72
}
73
#ifdef LIBCARLA_INCLUDED_FROM_UE4
74
75
WheelTelemetryData
(
const
FWheelTelemetryData
&TelemetryData)
76
:
tire_friction
(TelemetryData.TireFriction),
77
lat_slip
(TelemetryData.LatSlip),
78
long_slip
(TelemetryData.LongSlip),
79
omega
(TelemetryData.Omega),
80
tire_load
(TelemetryData.TireLoad),
81
normalized_tire_load
(TelemetryData.NormalizedTireLoad),
82
torque
(TelemetryData.Torque),
83
long_force
(TelemetryData.LongForce),
84
lat_force
(TelemetryData.LatForce),
85
normalized_long_force
(TelemetryData.NormalizedLongForce),
86
normalized_lat_force
(TelemetryData.NormalizedLatForce) {}
87
88
operator
FWheelTelemetryData
()
const
{
89
FWheelTelemetryData
TelemetryData;
90
TelemetryData.
TireFriction
=
tire_friction
;
91
TelemetryData.
LatSlip
=
lat_slip
;
92
TelemetryData.
LongSlip
=
long_slip
;
93
TelemetryData.
Omega
=
omega
;
94
TelemetryData.
TireLoad
=
tire_load
;
95
TelemetryData.
NormalizedTireLoad
=
normalized_tire_load
;
96
TelemetryData.
Torque
=
torque
;
97
TelemetryData.
LongForce
=
long_force
;
98
TelemetryData.
LatForce
=
lat_force
;
99
TelemetryData.
NormalizedLongForce
=
normalized_long_force
;
100
TelemetryData.
NormalizedLatForce
=
normalized_lat_force
;
101
102
return
TelemetryData;
103
}
104
#endif
105
106
MSGPACK_DEFINE_ARRAY(
tire_friction
,
107
lat_slip
,
108
long_slip
,
109
omega
,
110
tire_load
,
111
normalized_tire_load
,
112
torque
,
113
long_force
,
114
lat_force
,
115
normalized_long_force
,
116
normalized_lat_force
)
117
};
118
119
}
// namespace rpc
120
}
// namespace carla
MsgPack.h
carla::rpc::WheelTelemetryData
Definition
WheelTelemetryData.h:14
carla::rpc::WheelTelemetryData::normalized_lat_force
float normalized_lat_force
Definition
WheelTelemetryData.h:53
carla::rpc::WheelTelemetryData::WheelTelemetryData
WheelTelemetryData(const FWheelTelemetryData &TelemetryData)
Definition
WheelTelemetryData.h:75
carla::rpc::WheelTelemetryData::lat_slip
float lat_slip
Definition
WheelTelemetryData.h:44
carla::rpc::WheelTelemetryData::tire_load
float tire_load
Definition
WheelTelemetryData.h:47
carla::rpc::WheelTelemetryData::lat_force
float lat_force
Definition
WheelTelemetryData.h:51
carla::rpc::WheelTelemetryData::operator==
bool operator==(const WheelTelemetryData &rhs) const
Definition
WheelTelemetryData.h:70
carla::rpc::WheelTelemetryData::operator!=
bool operator!=(const WheelTelemetryData &rhs) const
Definition
WheelTelemetryData.h:55
carla::rpc::WheelTelemetryData::omega
float omega
Definition
WheelTelemetryData.h:46
carla::rpc::WheelTelemetryData::WheelTelemetryData
WheelTelemetryData(float tire_friction, float lat_slip, float long_slip, float omega, float tire_load, float normalized_tire_load, float torque, float long_force, float lat_force, float normalized_long_force, float normalized_lat_force)
Definition
WheelTelemetryData.h:19
carla::rpc::WheelTelemetryData::normalized_long_force
float normalized_long_force
Definition
WheelTelemetryData.h:52
carla::rpc::WheelTelemetryData::torque
float torque
Definition
WheelTelemetryData.h:49
carla::rpc::WheelTelemetryData::long_force
float long_force
Definition
WheelTelemetryData.h:50
carla::rpc::WheelTelemetryData::tire_friction
float tire_friction
Definition
WheelTelemetryData.h:43
carla::rpc::WheelTelemetryData::long_slip
float long_slip
Definition
WheelTelemetryData.h:45
carla::rpc::WheelTelemetryData::normalized_tire_load
float normalized_tire_load
Definition
WheelTelemetryData.h:48
carla::rpc::WheelTelemetryData::WheelTelemetryData
WheelTelemetryData()=default
carla
This file contains definitions of common data structures used in traffic manager.
Definition
Carla.cpp:133
FWheelTelemetryData
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehicleTelemetryData.h:13
FWheelTelemetryData::LatSlip
float LatSlip
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehicleTelemetryData.h:20
FWheelTelemetryData::Omega
float Omega
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehicleTelemetryData.h:26
FWheelTelemetryData::NormalizedTireLoad
float NormalizedTireLoad
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehicleTelemetryData.h:32
FWheelTelemetryData::Torque
float Torque
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehicleTelemetryData.h:35
FWheelTelemetryData::TireLoad
float TireLoad
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehicleTelemetryData.h:29
FWheelTelemetryData::LongForce
float LongForce
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehicleTelemetryData.h:38
FWheelTelemetryData::NormalizedLongForce
float NormalizedLongForce
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehicleTelemetryData.h:44
FWheelTelemetryData::NormalizedLatForce
float NormalizedLatForce
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehicleTelemetryData.h:47
FWheelTelemetryData::LatForce
float LatForce
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehicleTelemetryData.h:41
FWheelTelemetryData::LongSlip
float LongSlip
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehicleTelemetryData.h:23
FWheelTelemetryData::TireFriction
float TireFriction
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehicleTelemetryData.h:17
制作者
1.10.0