Skip to content

Commit 3a3177b

Browse files
authored
Merge pull request #446 from OpenSimulationInterface/feature/sm/sensorviewconfig-extension
Enhanced CameraSensorViewConfiguration Message
2 parents b56641b + 2b4fda2 commit 3a3177b

File tree

3 files changed

+109
-10
lines changed

3 files changed

+109
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ githooks/pre-commit
3535

3636
# PyCharm specific files
3737
.idea
38+
.vscode/settings.json

osi_common.proto

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,3 +491,30 @@ message StatePoint
491491
//
492492
optional Orientation3d orientation = 3;
493493
}
494+
//
495+
// \brief Detailed WavelengthRange message.
496+
//
497+
// Defines the start (minimum) and the end (maximum) values of the wavelength.
498+
// Additionally, the number of samples within this range is defined in this message.
499+
//
500+
message WavelengthData
501+
{
502+
// The start, or the minimum wavelength value.
503+
//
504+
// Unit: m
505+
//
506+
optional double start = 1;
507+
508+
// The end, or the maximum wavelength value.
509+
//
510+
// Unit: m
511+
//
512+
optional double end = 2;
513+
514+
// Number of samples to be considered within the defined wavelength range.
515+
// The number of samples includes the start and the end values that are defined in this message, starting from the "start" value.
516+
// \note This defines the number of wavelengths to be computed during simulation, not to be confused with samples_per_pixel.
517+
//
518+
optional double samples_number = 3;
519+
}
520+

osi_sensorviewconfiguration.proto

Lines changed: 81 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,34 @@ message CameraSensorViewConfiguration
706706
//
707707
repeated ChannelFormat channel_format = 8;
708708

709+
// Number of samples per pixel.
710+
//
711+
// \note This is a characteristic of the ray tracing engine of the
712+
// environment simulation, not a direct characteristic of the sensor.
713+
//
714+
// \rules
715+
// is_greater_than_or_equal_to: 1
716+
// \endrules
717+
//
718+
optional uint32 samples_per_pixel = 9;
719+
720+
// Maximum number of interactions to take into account.
721+
//
722+
// \note This is a characteristic of the ray tracing engine of the
723+
// environment simulation, not a direct characteristic of the sensor.
724+
//
725+
// \rules
726+
// is_greater_than_or_equal_to: 1
727+
// \endrules
728+
//
729+
optional uint32 max_number_of_interactions = 10;
730+
731+
// In use-cases where a spectral ray-tracer is used, this message
732+
// determines the range of the wavelength and its desired number
733+
// of samples.
734+
//
735+
repeated WavelengthData wavelength_data = 11;
736+
709737
// Channel format.
710738
//
711739
enum ChannelFormat
@@ -752,29 +780,72 @@ message CameraSensorViewConfiguration
752780
//
753781
CHANNEL_FORMAT_RGB_F32_LIN = 9;
754782

755-
// Bayer RGGB Channels UINT8 FP Linear.
783+
// Bayer BGGR Channels UINT8 FP Linear.
756784
//
757785
CHANNEL_FORMAT_BAYER_BGGR_U8_LIN = 10;
758786

759-
// Bayer RGGB Channels UINT16 FP Linear.
787+
// Bayer BGGR Channels UINT16 FP Linear.
760788
//
761789
CHANNEL_FORMAT_BAYER_BGGR_U16_LIN = 11;
762790

763-
// Bayer RGGB Channels UINT32 FP Linear.
791+
// Bayer BGGR Channels UINT32 FP Linear.
764792
//
765793
CHANNEL_FORMAT_BAYER_BGGR_U32_LIN = 12;
766794

767-
// Bayer RGGB Channels Single Precision FP Linear.
795+
// Bayer BGGR Channels Single Precision FP Linear.
768796
//
769797
CHANNEL_FORMAT_BAYER_BGGR_F32_LIN = 13;
770798

771-
// TBD: Further channel permutations and padding (e.g. RGBZ,
772-
// BGR, BAYER_RGGB/GBRG/GRBG/...), non-BAYER filters, non-linear
773-
// encodings, ...
774-
}
799+
// Bayer RGGB Channels UINT8 FP Linear.
800+
//
801+
CHANNEL_FORMAT_BAYER_RGGB_U8_LIN = 14;
775802

776-
// TBD: Optical (and other) effects to apply to image, etc.
777-
//
803+
// Bayer RGGB Channels UINT16 FP Linear.
804+
//
805+
CHANNEL_FORMAT_BAYER_RGGB_U16_LIN = 15;
806+
807+
// Bayer RGGB Channels UINT32 FP Linear.
808+
//
809+
CHANNEL_FORMAT_BAYER_RGGB_U32_LIN = 16;
810+
811+
// Bayer RGGB Channels Single Precision FP Linear.
812+
//
813+
CHANNEL_FORMAT_BAYER_RGGB_F32_LIN = 17;
814+
815+
// Red Clear Clear Clear Channels UINT8 FP Linear.
816+
//
817+
CHANNEL_FORMAT_RCCC_U8_LIN = 18;
818+
819+
// Red Clear Clear Clear Channels UINT16 FP Linear.
820+
//
821+
CHANNEL_FORMAT_RCCC_U16_LIN = 19;
822+
823+
// Red Clear Clear Clear Channels UINT32 FP Linear.
824+
//
825+
CHANNEL_FORMAT_RCCC_U32_LIN = 20;
826+
827+
// Red Clear Clear Clear Channels Single Precision FP Linear.
828+
//
829+
CHANNEL_FORMAT_RCCC_F32_LIN = 21;
830+
831+
// Red Clear Clear Blue Channels UINT8 FP Linear.
832+
//
833+
CHANNEL_FORMAT_RCCB_U8_LIN = 22;
834+
835+
// Red Clear Clear Blue Channels UINT16 FP Linear.
836+
//
837+
CHANNEL_FORMAT_RCCB_U16_LIN = 23;
838+
839+
// Red Clear Clear Blue Channels UINT32 FP Linear.
840+
//
841+
CHANNEL_FORMAT_RCCB_U32_LIN = 24;
842+
843+
// Red Clear Clear Blue Channels Single Precision FP Linear.
844+
//
845+
CHANNEL_FORMAT_RCCB_F32_LIN = 25;
846+
847+
}
848+
778849
}
779850

780851
//

0 commit comments

Comments
 (0)