diff --git a/osi_common.proto b/osi_common.proto index 3243a37a7..3bbd73628 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -632,7 +632,7 @@ message WavelengthData // \brief Definition of a spatial signal strength distribution // for an emitting / transmitting / receiving entity // with a horizontal and a vertical angle -// and the corresponding signal strength in dBm (decibels per milliwatt). +// and the corresponding signal strength in dBm. // message SpatialSignalStrength { @@ -650,18 +650,19 @@ message SpatialSignalStrength // optional double vertical_angle = 2; - // Emitted / transmitted /received signal strength - // of the emitting / transmitting / receiving entity + // Emitted / transmitted / received signal strength + // of the respective entity // at the previously defined horizontal and // vertical angle for one specific wavelength. // The value for the signal strength - // is given in dBm (decibels per milliwatt). + // is given in dBm. // // Unit: dBm // optional double signal_strength = 3; } + // // \brief The description of a color within available color spaces. // @@ -951,3 +952,37 @@ message KeyValuePair // optional string value = 2; } + +// +// \brief Definition of a spatial signal gain distribution +// for an emitting / transmitting / receiving entity +// with a horizontal and a vertical angle +// and the corresponding signal gain in dB. +// +message SpatialSignalGain +{ + // Horizontal angle (azimuth) of emission / transmission / reception + // in the entity's coordinate system. + // + // Unit: rad + // + optional double horizontal_angle = 1; + + // Vertical angle (elevation) of emission / transmission / reception + // in the entity's coordinate system. + // + // Unit: rad + // + optional double vertical_angle = 2; + + // Emitted / transmitted / received signal gain + // of the respective entity + // at the previously defined horizontal and + // vertical angle for one specific wavelength. + // The value for the signal gain + // is given in dB. + // + // Unit: dB + // + optional double signal_gain = 3; +} diff --git a/osi_sensorview.proto b/osi_sensorview.proto index a890261a7..1d83a8ee3 100644 --- a/osi_sensorview.proto +++ b/osi_sensorview.proto @@ -148,6 +148,10 @@ message SensorView // Ultrasonic-specific SensorView(s). // repeated UltrasonicSensorView ultrasonic_sensor_view = 1004; + + // Ray tracer-specific View(s). + // + repeated RayTracerView ray_tracer_view = 1005; } // @@ -162,6 +166,31 @@ message GenericSensorView optional GenericSensorViewConfiguration view_configuration = 1; } +// +// \brief Definition of the gain phase message used in RadarSensorView and LidarSensorView. +// +// Message containing the spatial signal gain und the correspondig signal phase. +// +message GainPhase +{ + // Received spatial signal gain. + // + // This describes the incoming direction and signal gain + // from the simulated scene. + // + // The signal can be received from a different angle than it has been emitted to. + // + // \note Data is in sensor coordinate system. + // + optional SpatialSignalGain spatial_signal_gain = 1; + + // The phase of the spatial_signal_gain at the sensor. + // + // Unit: rad + // + optional double phase = 2; +} + // // \brief Definition of the radar sensor view. // @@ -173,63 +202,39 @@ message RadarSensorView // optional RadarSensorViewConfiguration view_configuration = 1; - // Ray tracing data. + // Received signal. + // + // This field includes the returned signal in the scene, that is backscattered to the sensor. // - // This field includes one entry for each ray, in left-to-right, - // top-to-bottom order (think of scan lines in a TV). + // \note OSI uses singular instead of plural for repeated field names. // - repeated Reflection reflection = 2; + repeated ReceivedSignalElement received_signal_element = 2; // - // \brief Definition of the radar reflection. + // \brief Definition of the result of a e.g. rendering algorithm, which simulates the + // propagation of signal in a virtual scene. // - message Reflection + message ReceivedSignalElement { - // Relative signal level of the reflection. - // - // This takes the combined antenna diagram (losses in TX and RX) - // as well as the signal losses due to scattering and absorption - // into account, and will, when multiplied by TX power yield the - // actual RX power. + // This message containing the spatial_signal_gain and the correspondig phase. // - // Unit: dB - // - optional double signal_strength = 1; + repeated GainPhase gain_phase = 1; // Time of flight. // - // This is the time of flight of the reflection, which is directly - // proportional to the distance traveled. + // This is the time needed by the signal from emission to reception. // // Unit: s // optional double time_of_flight = 2; - // Doppler shift. + // Doppler shift // // Shift in frequency based on the specified TX frequency. // // Unit: Hz // optional double doppler_shift = 3; - - // TX horizontal angle (azimuth). - // - // Horizontal angle of incidence of the source of the reflection - // at the TX antenna. - // - // Unit: rad - // - optional double source_horizontal_angle = 4; - - // TX vertical angle (elevation). - // - // Vertical angle of incidence of the source of the reflection - // at the TX antenna. - // - // Unit: rad - // - optional double source_vertical_angle = 5; } } @@ -244,60 +249,48 @@ message LidarSensorView // optional LidarSensorViewConfiguration view_configuration = 1; - // Ray tracing data. + // Received signal element. // - // This field includes one entry for each ray, in left-to-right, - // top-to-bottom order (think of scan lines in a TV). + // This field includes one element of the returned signal in the scene, which is backscattered to the sensor. // - repeated Reflection reflection = 2; + // \note Due to e.g. super-sampling or diffuse reflections, a single emitted lidar beam can yield multiple signal returns. + // \note OSI uses singular instead of plural for repeated field names. + // + repeated ReceivedSignalElement received_signal_element = 2; // - // \brief Definition of the lidar reflection. + // \brief Definition of the result of a lidar rendering algorithm. // - message Reflection + message ReceivedSignalElement { - // Relative signal level of the reflection. - // - // This takes the signal losses due to scattering and absorption - // into account, and will, when multiplied by TX power yield the - // potential RX power (disregarding any other RX/TX losses). - // - // Unit: dB + // This message containing the spatial_signal_gain and the correspondig phase. // - optional double signal_strength = 1; + repeated GainPhase gain_phase = 1; // Time of flight. // - // This is the time of flight of the reflection, which is directly - // proportional to the distance traveled. + // This is the time needed by the signal from emission to reception. // // Unit: s // optional double time_of_flight = 2; - // Doppler shift. + // Doppler shift // - // Shift in frequency based on the specified TX frequency. + // Shift in frequency based on the emitted frequency. // // Unit: Hz // optional double doppler_shift = 3; - // normal to surface angle. - // - // The normal of the transmitted beam to the object, roadmarking etc - // encounter. \note data is in Lidar coordinate system - // - // Unit: unit vector + // Zero-based index of the emitted lidar beam as configured in + // LidarSensorViewConfiguration. // - optional Vector3d normal_to_surface = 5; - - // ID of the detected object this reflection is associated to. - // can be used for raytracing debug + // Unit: - // - // \note ID = MAX(uint64) indicates no reference to an object. - optional Identifier object_id = 6; + optional uint32 emitted_beam_id = 4; } + } // @@ -330,3 +323,44 @@ message UltrasonicSensorView // optional UltrasonicSensorViewConfiguration view_configuration = 1; } + +// +// \brief Definition of the ray tracer view. +// +// Ray tracer specific view data. +// +message RayTracerView +{ + // Ray tracer view configuration valid at the time the data was created. + // + optional RayTracerViewConfiguration view_configuration = 1; + + // Raw ray tracer data. + // + // The raw ray tracer data in the memory layout and order specified by the + // ray tracer input configuration. + // + optional bytes ray_tracer_data = 2; + + // Device type defines the device where the data is located. + // + optional DeviceType device_type = 3; + + // Enum consits of different predefined device types. + // + enum DeviceType + { + // Type of device type is unknown (must not be used). + // + DEVICE_TYPE_UNKNOWN = 0; + + // The data is located on the GPU. + // + DEVICE_TYPE_GPU = 1; + + // The data is located on the CPU. + // + DEVICE_TYPE_CPU = 2; + + } +} diff --git a/osi_sensorviewconfiguration.proto b/osi_sensorviewconfiguration.proto index e5c45c8f7..a64bbf71c 100644 --- a/osi_sensorviewconfiguration.proto +++ b/osi_sensorviewconfiguration.proto @@ -223,6 +223,11 @@ message SensorViewConfiguration // repeated UltrasonicSensorViewConfiguration ultrasonic_sensor_view_configuration = 1004; + + // Ray tracer-specific View Configuration(s). + // + repeated RayTracerViewConfiguration + ray_tracer_view_configuration = 1005; } // @@ -363,39 +368,6 @@ message RadarSensorViewConfiguration // Unit: rad optional double field_of_view_vertical = 5; - // Number of rays to cast across horizontal field of view (azimuth). - // - // \note This is a characteristic of the ray tracing engine of the - // environment simulation, not a direct characteristic of the sensor. - // - // \rules - // is_greater_than_or_equal_to: 1 - // \endrules - // - optional uint32 number_of_rays_horizontal = 6; - - // Number of rays to cast across vertical field of view (elevation). - // - // \note This is a characteristic of the ray tracing engine of the - // environment simulation, not a direct characteristic of the sensor. - // - // \rules - // is_greater_than_or_equal_to: 1 - // \endrules - // - optional uint32 number_of_rays_vertical = 7; - - // Maximum number of interactions to take into account. - // - // \note This is a characteristic of the ray tracing engine of the - // environment simulation, not a direct characteristic of the sensor. - // - // \rules - // is_greater_than_or_equal_to: 1 - // \endrules - // - optional uint32 max_number_of_interactions = 8; - // Emitter Frequency. // // This information can be used by a ray tracing engine to calculate @@ -412,40 +384,23 @@ message RadarSensorViewConfiguration // is_greater_than_or_equal_to: 0 // \endrules // - optional double emitter_frequency = 9; + optional double emitter_frequency = 6; // This represents the TX antenna diagram // - repeated AntennaDiagramEntry tx_antenna_diagram = 10; + repeated SpatialSignalGain tx_antenna_diagram = 7; // This represents the RX antenna diagram // - repeated AntennaDiagramEntry rx_antenna_diagram = 11; - + repeated SpatialSignalGain rx_antenna_diagram = 8; + + // Emitter power. // - // \brief The radar antenna diagram. + // emitter_power must be considered together with tx_antenna_diagram for absolute power calculation. // - // \note Rotation is defined analog Spherical3d - message AntennaDiagramEntry - { - // Horizontal deflection (azimuth) of entry in sensor/antenna - // coordinates. - // - // Unit: rad - optional double horizontal_angle = 1; - - // Vertical deflection (elevation) of entry in sensor/antenna - // coordinates. - // - // Unit: rad - optional double vertical_angle = 2; - - // Response of antenna at this point (positive dB is gain, - // negative dB is attenuation). - // - // Unit: dB - optional double response = 3; - } + // \note 0 dB as gain corresponds to the emitter power value. + // + optional double emitter_power = 9; } // @@ -497,99 +452,73 @@ message LidarSensorViewConfiguration // optional MountingPosition mounting_position_rmse = 3; - // Field of View in horizontal orientation of the physical sensor. + // Emitter wavelength. // - // Viewing range: [- \c #field_of_view_horizontal/2, \c - // #field_of_view_horizontal/2] azimuth in the sensor frame as defined in \c - // Spherical3d. + // This information can be used by a rendering engine to calculate + // signal interactions within the scene. // - // Unit: rad - optional double field_of_view_horizontal = 4; - - // Field of View in vertical orientation of the physical sensor. + // Unit: nm // - // Viewing range: [- \c #field_of_view_vertical/2, \c - // #field_of_view_vertical/2] elevation in the sensor frame at zero azimuth - // as defined in \c Spherical3d. // - // Unit: rad - optional double field_of_view_vertical = 5; + optional double emitter_wavelength = 4; - // Number of rays to cast across horizontal field of view. + // Emitted spatial signal gain per beam. // - // \note This is a characteristic of the ray tracing engine of the - // environment simulation, not a direct characteristic of the sensor. + // This describes the directions and signal gain of the emitted lidar beams, + // for which signal is to be expected from the simulated scene. + // Direction of beam center is given by the angles in the message + // + // \note Data is in sensor coordinate system // - // \rules - // is_greater_than_or_equal_to: 1 - // \endrules // - optional uint32 number_of_rays_horizontal = 6; + repeated SpatialSignalGain emitted_beam = 5; - // Number of rays to cast across vertical field of view. + // Time offset for each emitted signal. // - // \note This is a characteristic of the ray tracing engine of the - // environment simulation, not a direct characteristic of the sensor. + // The time offset in microseconds of every emitted signal + // from each frame timestamp. // - // \rules - // is_greater_than_or_equal_to: 1 - // \endrules + // Unit: s // - optional uint32 number_of_rays_vertical = 7; + // \note Usually, this is needed when ray tracing or similar techniques are applied. + // + // The time_offset_emission_size() must be the same as the emitted_signal_size(). + // + repeated uint32 time_offset_emission = 6; - // Maximum number of interactions to take into account. + // Horizontal beam divergence // - // \note This is a characteristic of the ray tracing engine of the - // environment simulation, not a direct characteristic of the sensor. + // The beam divergence in horizontal direction. // - // \rules - // is_greater_than_or_equal_to: 1 - // \endrules + // Unit: rad // - optional uint32 max_number_of_interactions = 8; + optional double beam_divergence_horizontal = 7; - // Emitter Frequency. + // Vertical beam divergence // - // This information can be used by a ray tracing engine to calculate - // doppler shift information and take into account differences in - // refraction and reflection. For doppler shift calculations the - // sensor model can of course always provide a nominal frequency and - // adjust the resulting doppler shift information to actual frequency - // through frequency adjustments. For material and geometry interaction - // purposes the frequency is also relevant. + // The beam divergence in vertical direction. // - // Unit: Hz - // - // \rules - // is_greater_than_or_equal_to: 0 - // \endrules + // Unit: rad // - optional double emitter_frequency = 9; + optional double beam_divergence_vertical = 8; - // Number of pixels in frame. + // Emitter pose. // - // This field includes the number of pixels in each frame + // Pose of the emitted signal in the sensor coordinate system. // - // \rules - // is_greater_than_or_equal_to: 1 - // \endrules - // - optional uint32 num_of_pixels = 10; + optional MountingPosition emitter_pose = 9; - // Ray tracing data. + // Receiver pose. // - // The directions unit vectors describing the Lidar's raster transmission - // directions. Length is num_of_pixels \note data is in Lidar's coordinate - // system + // Pose of the receiver unit in the sensor coordinate system. // - repeated Vector3d directions = 11; + optional MountingPosition receiver_pose = 10; - // Ray tracing data. + // Emitted beam id // - // The time offset in microseconds of every measurement from each frame - // timestamp. Length is num_of_pixels + // Zero-based Id of emitted beam. // - repeated uint32 timings = 12; + repeated uint32 emitted_beam_id = 11; } // @@ -913,3 +842,139 @@ message UltrasonicSensorViewConfiguration // TBD: Ultrasonic Sensor specific configuration. // } + + +// +// \brief The configuration settings for the ray tracer view to be +// provided by the environment simulation. +// +message RayTracerViewConfiguration +{ + // The ID of the sensor origin at host vehicle's mounting_position. + // + // This is the ID of the simulated sensor, to be used in its detected + // features output. + // + // The ID is to be provided by the environment simulation, the sensor + // model is not in a position to provide a useful default value. + // + optional Identifier sensor_id = 1; + + // The physical mounting position of the sensor (origin and orientation + // of the sensor coordinate system) given in vehicle coordinates [1]. + // The physical position pertains to this detector individually, and + // governs the sensor-relative coordinates in features detected by this + // detector. + // + // \arg \b x-direction of sensor coordinate system: sensor viewing direction + // \arg \b z-direction of sensor coordinate system: sensor (up) + // \arg \b y-direction of sensor coordinate system: perpendicular to x and z + // right hand system + // + // \par Reference: + // [1] DIN Deutsches Institut fuer Normung e. V. (2013). DIN ISO 8855 Strassenfahrzeuge - Fahrzeugdynamik und Fahrverhalten - Begriffe. (DIN ISO 8855:2013-11). Berlin, Germany. + // + // \note The origin of vehicle's coordinate system in world frame is + // ( \c MovingObject::base . \c BaseMoving::position + + // Inverse_Rotation_yaw_pitch_roll( \c MovingObject::base . \c + // BaseMoving::orientation) * \c + // MovingObject::VehicleAttributes::bbcenter_to_rear) . The orientation of + // the vehicle's coordinate system is equal to the orientation of the + // vehicle's bounding box \c MovingObject::base . \c + // BaseMoving::orientation. \note A default position can be provided by the + // sensor model (e.g. to indicate the position the model was validated for), + // but this is optional; the environment simulation must provide a valid + // mounting position (based on the vehicle configuration) when setting the + // view configuration. + // + // All ray tracing results e.g. Hitpoint positions are given in this + // sensor coordinate system. + // + optional MountingPosition mounting_position = 2; + + // Position of the ray tracer`s receiver in the sensor coordinate system. + // + repeated MountingPosition receiver_position = 3; + + // Position of the ray tracer`s transmitter in the sensor coordinate system. + // + repeated MountingPosition transmitter_position = 4; + + // The wavelength of the transmitted ray in the simulation. + // + // Unit: nm + optional double emitter_wavelength = 5; + + // When reaching the maximmum signal loss during ray tracing further ray tracing is aborted. + // The maximum signal loss is the relation between current calculated signal strength and the emitted signal + // strength at the ray generation. + // + // Unit: dB + optional double maximum_signal_loss = 6; + + // The maximum path length desribes the ray's maximum overall distance. + // If the maximum path length is reached during simulation no further interaction is calculated. + // + // Unit: m + optional double max_path_length = 7; + + // The maximum number of interaction desribes the ray's maximum hits with surfaces. + // If the maximum number of interaction is reached during simulation no further interaction is calculated. + // + // Unit: - + optional uint32 max_number_of_interactions = 8; + + // Format of ray tracer data (includes number, kind and format of channels). + // + // + // In the message provided to the sensor model, this field must + // contain exactly one value, indicating the format of the image + // data being provided by the simulation environment - which must + // be one of the values the sensor model requested - or there + // must be no value, indicating that the simulation environment + // cannot provide ray tracer data in one of the requested formats. + // + optional RayTracerFormat ray_tracer_format = 9; + + // Different predefined ray tracer formats + // + enum RayTracerFormat + { + // Type of channel format is unknown (must not be used). + // + RAY_TRACER_FORMAT_UNKNOWN = 0; + + // Unspecified but known channel format. + // Consider proposing an additional format if using + // \c #RAY_TRACER_FORMAT_OTHER. + // + RAY_TRACER_FORMAT_OTHER = 1; + + // Radar ray tracer format used in the Japanese DIVP project. + // + // The message consists of the following fields in the described order. + // In brackets the data type, the unit and a short description is given. + // distance (float; in m; path length of the ray) + // relative_speed (float; in m/s; summed relative speed due to interaction points with moved surfaces) + // propagation_attenuation_h_pol (float; in W; attenuation of signal strength of horizontal polarisation) + // propagation_attenuation_v_pol (float; in W; attenuation of signal strength of vertical polarisation) + // direction_of_arrival_azimuth (float; in rad; direction of arrival of the ray in the configured ray tracer coordinate system in azimuth direction) + // direction_of_arrival_elevation (float; in rad; direction of arrival of the ray in the configured ray tracer coordinate system in elevation direction) + // direction_of_departure_azimuth (float; in rad; direction of departure of the ray in the configured ray tracer coordinate system in azimuth direction) + // direction_of_departure_elevation (float; in rad; direction of departure of the ray in the configured ray tracer coordinate system in elevation direction) + // + RAY_TRACER_FORMAT_DIVP_RADAR = 2; + + // Radar ray tracer format used in the German VIVALDI project. + // + // The message consists of the following fields in the described order. + // In brackets the data type, the unit and a short description is given. + // intersection_path_length (float; in m; path length of the ray between the First_Hitpoint and the Last_Hitpoint) + // relative_speed (float; in m/s; summed relative speed due to interaction points with moved surfaces) + // jones_vector (float4; in V/m; jones vector of the ray with information of the electromagnetic wave`s phase, signal strength and polarisation) + // last_hitpoint (float3; in m; coordinates of the last hitpoint in the ray tracer's coordinate system defined by the mounting position) + // first_hitpoint (float3; in m; coordinates of the first hitpoint in the ray tracer's coordinate system defined by the mounting position) + // + RAY_TRACER_FORMAT_VIVALDI_RADAR = 3; + } +}