Skip to content

Improvement on Gear handling (HMI-ADAS extension) #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 62 additions & 51 deletions osi_common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 int32 gear = 1;

// The actual gear is 3.
// This Gear Lever controls an automatic transmission.
//
GEAR_3 = 3;
optional bool controls_automatic_transmission = 2;

// 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 = 3;

// 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 = 4;

// 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 = 5;

// 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;
}
}

//
Expand Down
4 changes: 2 additions & 2 deletions osi_driver_inputs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

//
Expand Down
70 changes: 40 additions & 30 deletions osi_vehicle.proto
Original file line number Diff line number Diff line change
Expand Up @@ -138,23 +138,33 @@ 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 Gear gear_gear_lever = 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
// 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 int32 gear_transmission = 8;

// The all-wheel drive (AWD) mode is engaged on the powertrain.
//
optional bool is_all_wheel_drive_engaged = 9;
}

//
Expand Down Expand Up @@ -264,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;
}
}