Skip to content
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

689 add raytracerview config #699

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 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
45 changes: 40 additions & 5 deletions osi_common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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 gain
// 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;
repeated double signal_strength = 3;
}


//
// \brief The description of a color within available color spaces.
//
Expand Down Expand Up @@ -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
//
repeated double signal_gain = 3;
}
152 changes: 95 additions & 57 deletions osi_sensorview.proto
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ message SensorView
// Ultrasonic-specific SensorView(s).
//
repeated UltrasonicSensorView ultrasonic_sensor_view = 1004;

// Raytracer-specific View(s).
//
repeated RaytracerView raytarcer_view = 1005;
}

//
Expand All @@ -173,63 +177,53 @@ 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.
// Received spatial element.
//
// 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 describes the incoming direction and signal strength in dB
// of the signal return from the simulated scene.
// The signal can be received from a different angle than it has been emitted to.
//
// Unit: dB
// \note Data is in sensor coordinate system.
//
optional double signal_strength = 1;

optional SpatialSignalGain spatial_signal_gain = 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.
// The phase of the spatial_signal_gain at the sensor.
//
// The phase_size() has to be equal to the spatial_signal_gain.signal_gain_size().
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is prone to errors and other conceptswould be possible like:

  • having the repeated double phase as part of the SpatialSignalGain aside of the repeated double signal_gain
  • have pairs of optional double phase and optional double signal_gain as e.g. a new message PhaseGain as part of the SpatialSignalGain as e.g. repeated PhaseGain phase_gain

Have such options been discussed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second option is implemented because of usage of SpatialSignalGain or SpatialSignalStrength in other messages in OSI like EmittingStructureAttribute

//
// Unit: rad
//
optional double source_vertical_angle = 5;
optional double phase = 4;
}
}

Expand All @@ -244,60 +238,63 @@ message LidarSensorView
//
optional LidarSensorViewConfiguration view_configuration = 1;

// Ray tracing data.
// Received signal element.
//
// This field includes one element of the returned signal in the scene, which 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 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 Reflection reflection = 2;
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.
// Received spatial signal gain.
//
// 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).
// This describes the incoming direction and signal gain
// from the simulated scene.
//
// Unit: dB
// The signal can be received from a different angle than it has been emitted to.
//
optional double signal_strength = 1;
// \note Data is in sensor coordinate system.
//
optional SpatialSignalGain spatial_signal_gain = 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 phase of the spatial_signal_gain at the sensor.
//
// The normal of the transmitted beam to the object, roadmarking etc
// encounter. \note data is in Lidar coordinate system
//
// Unit: unit vector
// The phase_size() has to be equal to the spatial_signal_gain.signal_gain_size().
//
// Unit: rad
//
optional Vector3d normal_to_surface = 5;
optional double phase = 4;

// ID of the detected object this reflection is associated to.
// can be used for raytracing debug
// Zero-based index of the emitted lidar beam as configured in
// LidarSensorViewConfiguration.
//
// \note ID = MAX(uint64) indicates no reference to an object.
optional Identifier object_id = 6;
// Unit: -
//
optional uint32 emitted_beam_id = 5;
}

}

//
Expand Down Expand Up @@ -330,3 +327,44 @@ message UltrasonicSensorView
//
optional UltrasonicSensorViewConfiguration view_configuration = 1;
}

//
// \brief Definition of the raytracer view.
//
// Raytracer specific view data.
//
message RaytracerView
{
// Raytracer view configuration valid at the time the data was created.
//
optional RaytracerViewConfiguration view_configuration = 1;

// Raw raytracer data.
//
// The raw raytracer data in the memory layout and order specified by the
// raytracer input configuration.
//
optional bytes raytarcer_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;

}
}
Loading