Permalink
Fetching contributors…
Cannot retrieve contributors at this time
167 lines (145 sloc) 5.21 KB
/*
* 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.
}