-
Notifications
You must be signed in to change notification settings - Fork 33
/
AutomotiveData.odvd
166 lines (145 loc) · 5.21 KB
/
AutomotiveData.odvd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/*
* AutomotiveData.odvd - Data structures for automotive applications.
* Copyright (C) 2015 - 2016 Christian Berger
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
///////////////////////////////////////////////////////////////////////////////
// Other messages.
message cartesian.Matrix3x3 [id = 52] {
double XX [id = 1];
double XY [id = 2];
double XZ [id = 3];
double YX [id = 4];
double YY [id = 5];
double YZ [id = 6];
double ZX [id = 7];
double ZY [id = 8];
double ZZ [id = 9];
}
message geodetic.WGS84 [id = 19] {
double latitude [id = 1];
double longitude [id = 3];
}
///////////////////////////////////////////////////////////////////////////////
// Messages describing entities in the Cartesian environment.
message cartesian.Point2 [id = 51] {
float p[2] [id = 1];
}
message cartesian.Position [id = 53] {
cartesian.Point2 position [id = 1];
cartesian.Point2 rotation [id = 2];
}
message cartesian.Constants [id = 50] {
const double PI = 3.141592653589793;
const double DEG2RAD = 0.017453292522222; // PI/180.0
const double RAD2DEG = 57.295779513082325; // 1.0 / DEG2RAD;
}
///////////////////////////////////////////////////////////////////////////////
// Generic automotive messages.
message automotive.Constants [id = 60] {
const double MS2KMH = 3.6;
const double KMH2MS = 0.277777777777778; // 1.0 / MS2KMH;
const double G = 9.81;
}
// TODO: Refactor me to ODVDCaroloCup.odvd.
message automotive.VehicleData [id = 39] {
cartesian.Point2 position [id = 1];
cartesian.Point2 velocity [id = 2];
double heading [id = 3];
double absTraveledPath [id = 4];
double relTraveledPath [id = 5];
double speed [id = 6];
double v_log [id = 7];
double v_batt [id = 8];
double temp [id = 9];
}
// TODO: Refactor me to ODVDCaroloCup.odvd.
message automotive.VehicleControl [id = 41] {
double speed [id = 1];
double acceleration [id = 2];
double steeringWheelAngle [id = 3];
bool brakeLights [id = 4];
bool flashingLightsLeft [id = 5];
bool flashingLightsRight [id = 6];
}
// TODO: Refactor me to ODVDCaroloCup.odvd.
message automotive.ForceControl [id = 33] {
double accelerationForce [id = 1];
double brakeForce [id = 2];
double steeringForce [id = 3];
bool brakeLights [id = 4];
bool flashingLightsLeft [id = 5];
bool flashingLightsRight [id = 6];
}
///////////////////////////////////////////////////////////////////////////////
// Miniature car messages.
// TODO: Refactor me to ODVDCaroloCup.odvd.
message automotive.miniature.SteeringData [id = 80] {
double exampleData [id = 1];
}
// TODO: Refactor me to ODVDCaroloCup.odvd.
message automotive.miniature.SensorBoardData [id = 81] {
uint32 numberOfSensors [id = 1];
map<uint32, double> distances [id = 2];
}
// TODO: Refactor me to ODVDCaroloCup.odvd.
message automotive.miniature.STM32F4Control [id = 82] {
uint32 dataFeed [id = 1];
}
// TODO: Refactor me to ODVDCaroloCup.odvd.
message automotive.miniature.STM32F4Data [id = 83] {
string rawData [id = 1];
}
// TODO: Refactor me to ODVDCaroloCup.odvd.
message automotive.miniature.UserButtonData [id = 84] {
enum ButtonStatus {
UNDEFINED = -1,
RELEASED = 0,
PRESSED = 1,
};
ButtonStatus buttonStatus [id = 1];
double duration [id = 2];
}
// TODO: Refactor me to ODVDCaroloCup.odvd.
message automotive.carolocup.Sensors [id = 87] {
uint32 usFront [id = 1];
uint32 usRear [id = 2];
uint32 irFrontRight [id = 3];
uint32 irRearRight [id = 4];
uint32 irBackLeft [id = 5];
uint32 irBackRight [id = 6];
uint32 gyroHeading [id = 7];
uint32 wheelRearLeft [id = 8];
uint32 wheelRearRight [id = 9];
uint32 buttonState [id = 10];
uint32 lightReading [id = 11];
}
// TODO: Refactor me to ODVDCaroloCup.odvd.
message automotive.carolocup.Control [id = 88] {
uint32 steering [id = 1];
uint32 speed [id = 2];
uint32 lights [id = 3]; // 0 = no lights, 1 = brake lights, 2 = blinking left, 4 = blinking right, 8 = emergency light
uint32 gyroTrigger [id = 4];
}
///////////////////////////////////////////////////////////////////////////////
// Vehicle messages.
// TODO: Keep me.
message automotive.GenericCANMessage [id = 71] {
odcore::data::TimeStamp driverTimeStamp [id = 1]; // TimeStamp from CAN driver.
uint64 identifier [id = 2]; // ID of the CAN message.
uint8 length [id = 3]; // Number of data bytes (1-8).
uint64 data [id = 4]; // Payload of the CAN message.
}