diff --git a/osi_adas_function.proto b/osi_adas_function.proto new file mode 100644 index 000000000..2d6dc173e --- /dev/null +++ b/osi_adas_function.proto @@ -0,0 +1,209 @@ +syntax = "proto2"; + +option optimize_for = SPEED; + +import "osi_common.proto"; +import "osi_common_extension.proto"; + +package osi3; + +// +// \brief An Interface to describe the communication of an ADAS-function. +// This proto is in far parts complementary to the osi_driver_inputs.proto. +// The inputs are divided into states and requests. +// +message AdasFunction +{ + // + // States the ADAS-function can set. + // + optional FunctionStates function_states = 1; + + // + // Requests of the ADAS-function. + // + optional FunctionRequests function_requests = 2; + + // + // \brief An Interface to describe the communication of an ADAS-function. + // The first set of signals are states the function sets internally + // and are relevant for the vehicle state. + // + message FunctionStates + { + // States of an ADAS-Function (SAE Level 3). + // + optional HadPilot hadpilot = 1; + + // States of the longitudinal control. + // + optional LongitudinalControl longitudinal_control = 2; + + // States of the lateral control. + // + optional LateralControl lateral_control = 3; + + // States of function Emergency-Brake-Assistant. + // + optional EmergencyBrakeAssistant emergency_brake_assistant = 4; + + // Request that the driver has to take over. + // 0=Off; 1=On + // + optional bool driver_take_over_request = 5; + + // Color of the steering wheel (e.g. to show the driving mode). + // See osi_common_extension. + // + optional ColorformatRGB steering_wheel_lighting_color = 6; + + // Requested state of the blindspot-lights (often in the side mirrors). + // + optional BlindSpotWarning blind_spot_warning = 7; + + // Defined states of the possible blind spot warnings. + // + enum BlindSpotWarning + { + // No warning. + // + BLIND_SPOT_WARNING_NONE = 0; + + // Left warning. + // + BLIND_SPOT_WARNING_LEFT = 1; + + // Right warning. + // + BLIND_SPOT_WARNING_RIGHT = 2; + + // Warning on both sides. + // + BLIND_SPOT_WARNING_BOTH = 3; + } + } + + // + // \brief An Interface to describe the communication of an ADAS-function. + // This proto is in far parts complementary to the osi_driver_inputs.proto. + // The inputs are divided into states and requests. + // + // The first set of signals are states the function sets internally + // and are relevant for the vehicle state. + // + message FunctionRequests + { + // All information about the trajectory the vehicle should follow. + // See osi_common_extension. + // + optional Trajectory trajectory = 1; + + // Angle, angle-speed and torque. + // See osi_common_extension. + // + optional Steeringwheel steeringwheel = 2; + + // Factor to scale the steeringtorque of the function output. + // 0-1 (0 = no force of the function, 0.5 = half the force, 1 = 100% Torque). + // + optional double steering_override_factor = 3; + + // Acceleration-, brakepedal and clutch. + // See osi_common_extension. + // + optional Pedalry pedalry = 4; + + // Position of the handbrake. + // 0-100 (percentage of position: Released - fully pressed) + // + optional double handbrake = 5; + + // This is a description of the possible indicatorstates. + // + optional Indicators indicators = 6; + + // This is a description of the possible indicatorstates. + // + enum Indicators + { + // No indicator. + // + INDICATORS_NONE = 0; + + // Left-indicator. + // + INDICATORS_LEFT = 1; + + // Right-indicator. + // + INDICATORS_RIGHT = 2; + + // Warning lights. + // + INDICATORS_ALL = 3; + } + } +} + +// +// \brief A description for highly automated driving (SAE Level 3). +// +// +message HadPilot +{ + // Activationstate of the function. + // + optional bool is_activated = 1; + + // This is the speed the function targets. + // E.g.: At the point of activation, the actual speed could be 80 km/h, + // but the function tries to accelerate to 130 km/h. + // In [km/h]. + // + optional double targeted_speed = 2; +} + +// +// \brief A description for the function longitudinal control. +// +// +message LongitudinalControl +{ + // Activationstate of the function. + // + optional bool is_activated = 1; + + // This is the speed the function targets. + // E.g.: At the point of activation, the actual speed could be 80 km/h, + // but the function tries to accelerate to 130 km/h. + // In [km/h]. + // + optional double targeted_speed = 2; + + // The timegap describes the minimumdistance to the next vehicle in front. + // In [s]. + // + optional double timegap = 3; +} + +// +// \brief A description for the function lateral control. +// +// +message LateralControl +{ + // Activationstate of the function. + // + optional bool is_activated = 1; +} + +// +// \brief A description for the function emergency brake assistant. +// +// +message EmergencyBrakeAssistant +{ + // Activationstate of the function. + // + optional bool is_activated = 1; +} diff --git a/osi_common_extension.proto b/osi_common_extension.proto new file mode 100644 index 000000000..d5e775bf2 --- /dev/null +++ b/osi_common_extension.proto @@ -0,0 +1,212 @@ +syntax = "proto2"; + +option optimize_for = SPEED; + +package osi3; + +// +// \brief A description for the steeringwheel. +// +message Steeringwheel +{ + // Angle of the steeringwheel. + // + // Unit in rad: 0=Central (Straight); Left>0; 0>Right. + // + optional double angle = 1; + + // Angle-speed of the steeringwheel. + // + // Unit in rad/s: 0=Central (Straight); Left>0; 0>Right. + // + optional double angular_speed = 2; + + // Torque of the steeringwheel to the hand. + // + // Unit in Nm: 0=Central (Straight); Left>0; 0>Right. + // + optional double torque = 3; +} + +// +// \brief A description for the positions of the pedals. +// +// +message Pedalry +{ + // Position of the acceleration-pedal. + // 0-100 (percentage of position: Unpressed - fully pressed) + // + optional double pedal_position_acceleration = 1; + + // Position of the brake-pedal. + // 0-100 (percentage of position: Unpressed - fully pressed) + // + optional double pedal_position_brake = 2; + + // Position of the clutch-pedal. + // 0-100 (percentage of position: Unpressed - fully pressed) + // + optional double pedal_position_clutch = 3; +} + +// +// \brief This is a message to describe, which trajectory the vehicle should follow. +// +// +message Trajectory +{ + // Contains the timestamp where the trajectorypoint should be reached. + // In [s]. + // + optional Timestamp timestamp = 1; + + // Contains the X-Position the vehicle should be at the timestamp. + // + optional double targeted_pos_x = 2; + + // Contains the Y-Position the vehicle should be at the timestamp. + // + optional double targeted_pos_y = 3; + + // Direction of the vehicle at the timestamp. + // In [Rad]. + // + optional double trackangle = 4; + + // Contains the curvature at the timestamp. + // In [1/m]. + // + optional double curvature = 5; + + // Contains the curvaturechange at the timestamp. + // In [1/m*s]. + // + optional double curvaturechange = 6; + + // Contains the velocity of the vehicle at the timestamp. + // In [m/s]. + // + optional double velocity = 7; + + // Contains the acceleration of the vehicle at the timestamp. + // In [m/s^2]. + // + optional double acceleration = 8; + + // Contains the interpolation method. + // + optional InterpolationMethod interpolation_method = 9; + + // Contains the interpolation method. + // + enum InterpolationMethod + { + // Stay on the actual lane. + // + INTERPOLATION_METHOD_LINEAR = 0; + + // Change to the left. + // + INTERPOLATION_METHOD_CUBIC = 1; + } +} + +// The actual gear of the car. +// +enum Gear +{ + // The actual gear was not calculated by the dynamicmodell. + // + GEAR_UNKNOWN = 0; + + // The actual gear is 1. + // + GEAR_1 = 1; + + // The actual gear is 2. + // + GEAR_2 = 2; + + // The actual gear is 3. + // + GEAR_3 = 3; + + // The actual gear is 4. + // + GEAR_4 = 4; + + // The actual gear is 5. + // + GEAR_5 = 5; + + // The actual gear is 6. + // + GEAR_6 = 6; + + // The actual gear is 7. + // + GEAR_7 = 7; + + // The actual gear is 8. + // + GEAR_8 = 8; + + // The actual gear is 9. + // + GEAR_9 = 9; + + // The car is in idling-mode. + // + GEAR_IDLING = 10; + + // The car is in reverse-mode. + // + GEAR_REVERSE = 11; + + // The car is in automatic-driving-mode. + // + GEAR_D = 20; + + // The car is in automatic-idling-mode. + // + GEAR_N = 21; + + // The car is in automatic-parking-mode. + // + GEAR_P = 22; + + // The car has an automatic transmission, but the driver shifts up by his own. + // + GEAR_UP = 30; + + // The car has an automatic transmission, but the driver shifts by his own. + // + GEAR_MID = 31; + + // The car has an automatic transmission, but the driver shifts down by his own. + // + GEAR_DOWN = 32; +} + +// +// \brief A 3D-vector for color-description regarding the RGB-format. +// More information: https://en.wikipedia.org/wiki/RGB_color_model. +// +message ColorformatRGB +{ + // The part of red. + // Values from 0 to 255. + // + optional uint32 rgb_red = 1; + + // The part of green. + // Values from 0 to 255. + // + optional uint32 rgb_green = 2; + + // The part of blue. + // Values from 0 to 255. + // + optional uint32 rgb_blue = 3; +} diff --git a/osi_driver_inputs.proto b/osi_driver_inputs.proto new file mode 100644 index 000000000..693513571 --- /dev/null +++ b/osi_driver_inputs.proto @@ -0,0 +1,127 @@ +syntax = "proto2"; + +option optimize_for = SPEED; + +import "osi_common.proto"; +import "osi_common_extension.proto"; +import "osi_adas_function.proto"; + +package osi3; + +// +// \brief An Interface to describe the inputs from a human driver. +// Contains a base-set of signals with focus on ADAS-functions. +// The inputs are divided into states and requests. +// +message DriverInputs +{ + // + // The first set of signals are states the driver can (usually) directly set. + // + optional DriverInitializedStates driver_initialized_states = 1; + + // + // The second set of signals are requests addressed to an external function. + // + optional DriverRequests driver_requests = 2; + + // + // \brief The first set of signals are states the driver can (usually) directly set. + // + message DriverInitializedStates + { + // State of the driver seat-belt. It is often an initial condition to start an ADAS-Function. + // 0=Open; 1=Closed + // + optional bool seat_belt = 1; + + // State of the doors. It is often an initial condition to start an ADAS-Function. + // 0=Open; 1=Closed + // + optional bool doors = 2; + + // Hands-On-Detection. + // 0=HandsOff; 1=HandsOn + // + optional bool hands_on_detection = 3; + + // State of the ignition. It is often an initial condition to start an ADAS-Function. + // 0=Off; 1=On + // + optional bool ignition = 4; + + // State of the warning lights. + // 0=Off; 1=On + // + optional bool warning_lights = 5; + + // Angle, angle-speed and torque. + // See osi_common_extension. + // + optional Steeringwheel steeringwheel = 6; + + // Acceleration-, brakepedal and clutch. + // See osi_common_extension. + // + optional Pedalry pedalry = 7; + + // Position of the handbrake. + // 0-100 (percentage of position: Released - fully pressed) + // + optional double handbrake = 8; + + // Position of the gearlever. + // See osi_common_extension. + // + optional Gear gearlever = 9; + } + + // + // \brief The second set of signals are requests addressed to an external function. + // The ADAS-function can react to a request by setting its own states. + // The osi_adas_function.proto is widely complementary to this proto. + // For e.g. the driver wants to activate a function, but the initial-conditions of the + // ADAS-function are not fullfilled, the request is without an effect to the driving behaviour. + // + message DriverRequests + { + // Wished states of the driver regarding an ADAS-Function (SAE Level 3). + // + optional HadPilot hadpilot = 1; + + // Wished states of the driver regarding the longitudinal control. + // + optional LongitudinalControl longitudinal_control = 2; + + // Wished states of the driver regarding the lateral control. + // + optional LateralControl lateral_control = 3; + + // Wished states of the driver regarding the function Emergency-Brake-Assistant. + // + optional EmergencyBrakeAssistant emergency_brake_assistant = 4; + + // Request to an ADAS-Function for a lane change. + // 0=EgoLane; 1=Left; 2=Right + // + optional LaneChangeRequest lane_change_request = 5; + + // Request to an ADAS-Function for a lane change. + // 0=EgoLane; 1=Left; 2=Right + // + enum LaneChangeRequest + { + // Stay on the actual lane. + // + LANE_CHANGE_REQUEST_EGO_LANE = 0; + + // Change to the left. + // + LANE_CHANGE_REQUEST_LC_LEFT = 1; + + // Change to the right. + // + LANE_CHANGE_REQUEST_LC_RIGHT = 2; + } + } +} diff --git a/osi_environment_extension.proto b/osi_environment_extension.proto new file mode 100644 index 000000000..02f0f69d7 --- /dev/null +++ b/osi_environment_extension.proto @@ -0,0 +1,23 @@ +syntax = "proto2"; + +option optimize_for = SPEED; + +package osi3; + +// +// \brief Just a small extension of osi_environment (Environmental conditions), so this is not a standalone .proto. +// It was thought to be one, but this changed. +// +message Environment +{ + // Contains the velocity of the wind (global weather). + // In [m/s]. + // + optional double wind_speed = 1; + + // Contains the direction of the wind (global weather). + // In [Degree]. Wind direction is measured in degrees clockwise from due north. + // Like on a windrose. E.g.: A wind blowing from the north has a wind direction of 0 Degree. + // + optional double wind_direction = 2; +} diff --git a/osi_vehicle.proto b/osi_vehicle.proto new file mode 100644 index 000000000..ea28884a2 --- /dev/null +++ b/osi_vehicle.proto @@ -0,0 +1,233 @@ +syntax = "proto2"; + +option optimize_for = SPEED; + +import "osi_common.proto"; +import "osi_common_extension.proto"; + +package osi3; + +// +// \brief Interface to the vehicle-model. So where the movement of a car is calculated, +// but also the behaviour of some components of the car itself. +// Consists of four messages: VehicleKinematics, VehiclePowertrain, VehicleSteeringwheel and VehicleWheels. +// +message OsiVehicle +{ + // + // So this is the interface, that describes how the vehicle is moving. + // All coordinates and orientations are relative to the global ground truth + // coordinate system. + // + optional VehicleKinematics vehicle_kinematics = 1; + + // + // Interface to the vehicle-model. + // The focus here is on the powertrain. + // + optional VehiclePowertrain vehicle_powertrain = 2; + + // + // Interface to the vehicle-model. + // The focus here is on the steeringwheel. + // + optional VehicleSteeringwheel vehicle_steeringwheel = 3; + + // + // Interface to the vehicle-model. + // The focus here is on the physical description of a wheel. + // + optional VehicleWheels vehicle_wheels = 4; + + // + // \brief So this is the interface, that describes how the vehicle is moving. + // All coordinates and orientations are relative to the global ground truth + // coordinate system. + // + message VehicleKinematics + { + // The 3D dimension of the moving object (its bounding box). + // + optional Dimension3d dimension = 1; + + // The reference point for position and orientation: the center (x,y,z) of + // the bounding box. + // + optional Vector3d position = 2; + + // The relative velocity of the moving object w.r.t. its parent frame and + // parent velocity. + // The velocity becomes global/absolute if the parent frame does not move. + // + // #position (t) := #position (t-dt)+ #velocity *dt + // + optional Vector3d velocity = 3; + + // The relative acceleration of the moving object w.r.t. its parent frame + // and parent acceleration. + // The acceleration becomes global/absolute if the parent frame is not + // accelerating. + // + // #position (t) := #position (t-dt)+ #velocity *dt+ #acceleration /2*dt^2 + // + // #velocity (t) := #velocity (t-dt)+ #acceleration *dt + // + optional Vector3d acceleration = 4; + + // The relative orientation of the moving object w.r.t. its parent frame. + // + // Origin_base_moving_entity := Rotation_yaw_pitch_roll(#orientation)*(Origin_parent_coordinate_system - #position) + // + // \note There may be some constraints how to align the orientation w.r.t. + // to some stationary object's or entity's definition. + // + optional Orientation3d orientation = 5; + + // The relative orientation rate of the moving object w.r.t. its parent + // frame and parent orientation rate in the center point of the bounding box + // (origin of the bounding box frame). + // + // Rotation_yaw_pitch_roll(#orientation (t)) := Rotation_yaw_pitch_roll(#orientation_rate *dt)*Rotation_yaw_pitch_roll(#orientation (t-dt)) + // + // \note #orientation (t) is \b not equal #orientation (t-dt)+#orientation_rate *dt + // + optional Orientation3d orientation_rate = 6; + + // The relative orientation rate acceleration of the moving object w.r.t. its parent + // frame and parent orientation rate in the center point of the bounding box + // (origin of the bounding box frame). + // + // Rotation_yaw_pitch_roll(#orientation (t)) := Rotation_yaw_pitch_roll(#orientation_rate *dt)*Rotation_yaw_pitch_roll(#orientation (t-dt)) + // + // \note #orientation (t) is \b not equal #orientation (t-dt)+#orientation_rate *dt + // + optional Orientation3d orientation_rate_acceleration = 7; + } + + // + // \brief Interface to the vehicle-model. + // The focus here is on the powertrain. + // + message VehiclePowertrain + { + // The positions of the pedals. + // + optional Pedalry pedalry = 1; + + // Rounds per minute of the crankshaft. + // + optional double engine_rpm = 2; + + // Torque in Nm. + // + optional double engine_torque = 3; + + // Consumption in liters per 100 km. + // + optional double engine_consumption = 4; + + // Consumption in liters per 100 km. + // + optional double fuel_consumption = 4; + + // Consumption of electrical or hybrid vehicle + // + optional double electrical_energy_consumption = 5; + + // The actual gear of the car. + // + optional Gear gear = 6; + } + + // + // \brief Interface to the vehicle-model. + // The focus here is on the steeringwheel. + // + message VehicleSteeringwheel + { + // Angle, angle-speed and torque. + // See osi_common_extension. + // + optional Steeringwheel steeringwheel = 1; + + // Spring-stiffness of the steering in Nm/Deg. + // + optional double stw_springstiffness = 2; + + // Damping of the steering in Nm*s/Deg. + // + optional double stw_damping = 3; + + // Friction of the steering in Nm. + // + optional double stw_friction = 4; + } + + // + // \brief Interface to the vehicle-model. + // The focus here is on the wheels. + // It is made usage of the wheel-message to shorten the code. + // + message VehicleWheels + { + // Contains the physical description of the front-left wheel. + // + optional Wheel wheel_front_left = 1; + + // Contains the physical description of the front-right wheel. + // + optional Wheel wheel_front_right = 2; + + // Contains the physical description of the rear-left wheel. + // + optional Wheel wheel_rear_left = 3; + + // Contains the physical description of the rear-right wheel. + // + optional Wheel wheel_rear_right = 4; + } + + // + // \brief Interface to the vehicle-model. + // The focus here is on the physical description of a wheel. + // + message Wheel + { + // Contains the friction-coefficient of each wheel. + // Dimensionless. + // + optional double friction_coefficient = 1; + + // Contains the z-coordinate (contact-point) of each wheel. + // Dimensionless. + // + optional double contact_point = 2; + + // Contains the rotational speed of each wheel per second. + // In [Rad/s]. + // + optional double rotational_speed = 3; + + // Contains the steering angle of each wheel. + // In [Rad]. + // + optional double steeringangle = 4; + + // Contains the camber of each wheel. + // In [Rad]. + // Negative camber if the bottom of the wheel is farther out than the top. + // For more information: https://en.wikipedia.org/wiki/Camber_angle. + // + optional double camber = 5; + + // Contains the tirepressure of each tire. + // In [Pascal]. + // + optional double tirepressure = 6; + + // Contains the springdeflection in z-direction for each wheel. + // In [mm]. + // + optional double springdeflection = 7; + } +}