CARLA
Loading...
Searching...
No Matches
WheelTelemetryData.h
Go to the documentation of this file.
1// Copyright (c) 2026 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#ifdef LIBCARLA_INCLUDED_FROM_UE4
13#endif // LIBCARLA_INCLUDED_FROM_UE4
14
15namespace carla {
16namespace rpc {
17
18 // Per-wheel runtime telemetry exposed to clients.
19 //
20 // Only the fields that the Chaos vehicle solver populates live are kept here.
21 // The PhysX-era surface (tire_friction, tire_load, normalized_tire_load,
22 // torque, long_force, lat_force, normalized_long_force, normalized_lat_force)
23 // is intentionally absent: those values were read from UVehicleWheel debug
24 // members that the Chaos plugin declares but never writes, so reporting them
25 // on UE5 would produce permanent zeros.
27 public:
28
29 WheelTelemetryData() = default;
30
32 float lat_slip,
33 float long_slip,
34 float omega)
37 omega(omega) {}
38
39 float lat_slip = 0.0f;
40 float long_slip = 0.0f;
41 float omega = 0.0f;
42
43#ifdef LIBCARLA_INCLUDED_FROM_UE4
44
46 : lat_slip(Data.LatSlip),
47 long_slip(Data.LongSlip),
48 omega(Data.Omega) {}
49
50 operator FWheelTelemetryData() const {
52 Data.LatSlip = lat_slip;
53 Data.LongSlip = long_slip;
54 Data.Omega = omega;
55 return Data;
56 }
57
58#endif // LIBCARLA_INCLUDED_FROM_UE4
59
60 bool operator!=(const WheelTelemetryData &rhs) const {
61 return
62 lat_slip != rhs.lat_slip ||
63 long_slip != rhs.long_slip ||
64 omega != rhs.omega;
65 }
66
67 bool operator==(const WheelTelemetryData &rhs) const {
68 return !(*this != rhs);
69 }
70
74 omega
75 );
76 };
77
78} // namespace rpc
79} // namespace carla
WheelTelemetryData(const FWheelTelemetryData &Data)
MSGPACK_DEFINE_ARRAY(lat_slip, long_slip, omega)
bool operator==(const WheelTelemetryData &rhs) const
bool operator!=(const WheelTelemetryData &rhs) const
WheelTelemetryData(float lat_slip, float long_slip, float omega)
This file contains definitions of common data structures used in traffic manager.