From 2b1cfe2f505f83690077ab228893e31a17b2dd07 Mon Sep 17 00:00:00 2001 From: Aina Rasoldier Date: Wed, 10 Jul 2019 13:05:22 +0200 Subject: [PATCH 1/3] update of Gear (->GearLeverState) message clarifying its state and differenciating power train and lever states --- osi_common.proto | 113 ++++++++++++++++++++++------------------ osi_driver_inputs.proto | 4 +- osi_vehicle.proto | 14 ++++- 3 files changed, 76 insertions(+), 55 deletions(-) diff --git a/osi_common.proto b/osi_common.proto index 559cb14b3..ea714968a 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -549,81 +549,92 @@ message Trajectory // The actual gear of the car. // -enum Gear +message GearLeverState { - // The actual gear was not calculated by the dynamicmodell. + // Current set gear of the gear lever. It is optional if none of these + // conditions is fulfilled: + // - the gear lever controls a manual transmission + // - the gear lever controls an automatic transmission with the manual + // override mode set. // - GEAR_UNKNOWN = 0; - - // The actual gear is 1. - // - GEAR_1 = 1; - - // The actual gear is 2. + // The sign of this field set the gear's mode as following: + // - zero: neutral position + // - positive: driving forward mode + // - negative: reverse mode (generally -1, but some vehicles have several + // reverse mode gears) // - GEAR_2 = 2; + optional integer gear = 0; - // The actual gear is 3. + // This Gear Lever controls an automatic transmission. // - GEAR_3 = 3; + optional bool controls_automatic_transmission = 1; - // The actual gear is 4. + // Transmission mode of an automatic transmission. // - GEAR_4 = 4; - - // The actual gear is 5. + // Optional if the transmission is manual. // - GEAR_5 = 5; + optional AutomaticTransmissionMode automatic_transmission_mode = 2; - // The actual gear is 6. + // The request from the driver to shift gear if the transmission mode is + // MANUAL_OVERRIDE_MODE. // - GEAR_6 = 6; + optional ManualOverrideRequest manual_override_request = 3; - // The actual gear is 7. + // The all-wheel drive (AWD) mode is engaged by the driver. // - GEAR_7 = 7; + optional bool is_all_wheel_drive_engaged = 4; - // The actual gear is 8. + // Describe the possible mode of an automatic transmission. // - GEAR_8 = 8; + enum AutomaticTransmissionMode + { + // The gear lever is in automatic parking mode. + // + PARK_MODE = 0; - // The actual gear is 9. - // - GEAR_9 = 9; + // The gear lever is in reverse motion mode. + // + REVERSE_MODE = 1; - // The car is in idling-mode. - // - GEAR_IDLING = 10; + // The gear lever is in automatic neutral mode. + // + NEUTRAL_MODE = 2; - // The car is in reverse-mode. - // - GEAR_REVERSE = 11; + // The gear lever is in automatic driving mode. + // + DRIVE_MODE = 3; - // The car is in automatic-driving-mode. - // - GEAR_D = 20; + // The gear lever is in a manual override mode. + // + MANUAL_OVERRIDE_MODE = 4; - // The car is in automatic-idling-mode. - // - GEAR_N = 21; + // The gear lever is in a non common mode. + // + OTHER_MODE = 5; - // The car is in automatic-parking-mode. - // - GEAR_P = 22; + // The gear lever's position is unknown. + // + UKNOWN_MODE = 6; + } - // The car has an automatic transmission, but the driver shifts up by his - // own. + // Describe a request for a gear change on automatic transmission vehicle + // with a gear shifter. // - GEAR_UP = 30; + enum ManualOverrideRequest + { + // The driver shifts down on his own. + // + GEAR_DOWN = 0; - // The car has an automatic transmission, but the driver shifts by his own. - // - GEAR_MID = 31; + // The automatic transmission is in manual override mode but the driver + // is not shifting the gear. + // + GEAR_MID = 1; - // The car has an automatic transmission, but the driver shifts down by his - // own. - // - GEAR_DOWN = 32; + // The driver shifts up on his own. + // + GEAR_UP = 2; + } } // diff --git a/osi_driver_inputs.proto b/osi_driver_inputs.proto index 2eb752618..3ab1d7b58 100644 --- a/osi_driver_inputs.proto +++ b/osi_driver_inputs.proto @@ -71,10 +71,10 @@ message DriverInputs // optional double handbrake_position = 8; - // Position of the gear lever. + // State of the gear lever. // See osi_common_extension. // - optional Gear gear_lever = 9; + optional GearLeverState gear_lever_state = 9; } // diff --git a/osi_vehicle.proto b/osi_vehicle.proto index 40968f37d..6e7d483db 100644 --- a/osi_vehicle.proto +++ b/osi_vehicle.proto @@ -148,13 +148,23 @@ message OsiVehicle // The actual gear of the gear lever. // - optional Gear gear_gear_lever = 6; + optional GearLeverState gear_lever_state = 6; // The actual gear of the transmission. // E.g. gear_lever can be in "D" and transmission in "4", but not the // other way around. // - optional Gear gear_transmission = 7; + // The sign of this field is linked to the gear's mode as following: + // - zero: neutral position + // - positive: driving forward mode + // - negative: reverse mode (generally -1, but few vehicles have several + // reverse mode gears) + // + optional integer gear_transmission = 7; + + // The all-wheel drive (AWD) mode is engaged on the powertrain. + // + optional bool is_all_wheel_drive_engaged = 8; } // From cf1047cea2c43cac173fa44c2397ebe8cbd3adb1 Mon Sep 17 00:00:00 2001 From: Aina Rasoldier Date: Thu, 11 Jul 2019 14:26:30 +0200 Subject: [PATCH 2/3] Corrected types and field numbers --- osi_common.proto | 10 +++++----- osi_vehicle.proto | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/osi_common.proto b/osi_common.proto index ea714968a..c711d2d3a 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -563,26 +563,26 @@ message GearLeverState // - negative: reverse mode (generally -1, but some vehicles have several // reverse mode gears) // - optional integer gear = 0; + optional int32 gear = 1; // This Gear Lever controls an automatic transmission. // - optional bool controls_automatic_transmission = 1; + optional bool controls_automatic_transmission = 2; // Transmission mode of an automatic transmission. // // Optional if the transmission is manual. // - optional AutomaticTransmissionMode automatic_transmission_mode = 2; + optional AutomaticTransmissionMode automatic_transmission_mode = 3; // The request from the driver to shift gear if the transmission mode is // MANUAL_OVERRIDE_MODE. // - optional ManualOverrideRequest manual_override_request = 3; + optional ManualOverrideRequest manual_override_request = 4; // The all-wheel drive (AWD) mode is engaged by the driver. // - optional bool is_all_wheel_drive_engaged = 4; + optional bool is_all_wheel_drive_engaged = 5; // Describe the possible mode of an automatic transmission. // diff --git a/osi_vehicle.proto b/osi_vehicle.proto index 6e7d483db..85a452ba6 100644 --- a/osi_vehicle.proto +++ b/osi_vehicle.proto @@ -138,17 +138,17 @@ message OsiVehicle // // Unit: [l] // - optional double fuel_consumption = 4; + optional double fuel_consumption = 5; // Consumption of electrical or hybrid vehicle per 100 km // // Unit: [kWh] // - optional double electrical_energy_consumption = 5; + optional double electrical_energy_consumption = 6; // The actual gear of the gear lever. // - optional GearLeverState gear_lever_state = 6; + optional GearLeverState gear_lever_state = 7; // The actual gear of the transmission. // E.g. gear_lever can be in "D" and transmission in "4", but not the @@ -160,11 +160,11 @@ message OsiVehicle // - negative: reverse mode (generally -1, but few vehicles have several // reverse mode gears) // - optional integer gear_transmission = 7; + optional int32 gear_transmission = 8; // The all-wheel drive (AWD) mode is engaged on the powertrain. // - optional bool is_all_wheel_drive_engaged = 8; + optional bool is_all_wheel_drive_engaged = 9; } // From 69555f866d41928edf5937edf71d01d4fc0f5a92 Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Thu, 11 Jul 2019 16:54:32 +0200 Subject: [PATCH 3/3] removed spaces --- osi_vehicle.proto | 52 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/osi_vehicle.proto b/osi_vehicle.proto index 85a452ba6..0c61d4c24 100644 --- a/osi_vehicle.proto +++ b/osi_vehicle.proto @@ -274,31 +274,31 @@ message OsiVehicle // Unit: [mm] // optional double springdeflection = 7; - - //Contains the relativ position of the wheel to the center of the car - // - //Unit: [m] - // - optional Vector3d position = 8; - - //Contains the relativ orientation of the wheel to the center of the car - //As the rotation of the wheel is also controlled by this value, - // - //Unit: [rad] - // - optional Orientation3d orientation = 9; - - //Contains the absolute (longitunal) slip of the tire - //0-100 percent - // - //Unit: [] - // - optional double slip = 10; - - //Contains the slip-angle of the tire - // - //Unit: [rad] - // - optional double slipangle = 11; + + //Contains the relativ position of the wheel to the center of the car + // + //Unit: [m] + // + optional Vector3d position = 8; + + //Contains the relativ orientation of the wheel to the center of the car + //As the rotation of the wheel is also controlled by this value, + // + //Unit: [rad] + // + optional Orientation3d orientation = 9; + + //Contains the absolute (longitunal) slip of the tire + //0-100 percent + // + //Unit: [] + // + optional double slip = 10; + + //Contains the slip-angle of the tire + // + //Unit: [rad] + // + optional double slipangle = 11; } }