OpenSimulationInterface / open-simulation-interface

A generic interface for the environmental perception of automated driving functions in virtual scenarios.
Other
273 stars 127 forks source link

(feat SensorModelling) add pixel_order field #698

Closed RIFJo closed 1 year ago

RIFJo commented 1 year ago

Signed-off-by: RIFJo jochmann@rt.rif-ev.de

#### Reference to a related issue in the repository refers to #620

Add a description

Adds a "pixel_order" field and enum to allow mirrored versions of the pixel layouts. This is the result of the discussions with the participants in the sensor modelling workgroup meetings.

This pull request also includes the changes from Thomas Sedlmayer in https://github.com/OpenSimulationInterface/open-simulation-interface/pull/684

Take this checklist as orientation for yourself, if this PR is ready for the Change Control Board:

If you can’t check all of them, please explain why. If all boxes are checked or commented and you have achieved at least one positive review, you can assign the label ReadyForCCBReview!

RIFJo commented 1 year ago

plus one more commit to clean up the triple-slash.

jdsika commented 1 year ago

We have to check if we can edit the interface_conventions.

My take here:

1) we add this feature to 3.6 and comply with the current enum convention and leave the values UNKNOWN and OTHER 2) we create an issue for 4.0 and rework the interface convention regarding ENUMS

jdsika commented 1 year ago
ClemensLinnhoff commented 1 year ago
  • Rename default to the actual pixel order
  • Reference default enum value correctly in the comments

I changed it accordingly. I also changed the (for me) confusing naming of "mirrored" to the actual pixel order.

@RIFJo does this work for you?

RIFJo commented 1 year ago

I also changed the (for me) confusing naming of "mirrored" to the actual pixel order. @RIFJo does this work for you?

I am unhappy about this change of wording, but i can live with it. Maybe keep the enum entries as it is now, but mention the mirroring direction in the documentation comment ("the pixels are ordered right to left, top to bottom. This represents a mirroring about the vertical axis (left-to-right) compared to the default order") ?

Anyway, thats just minor nitpicking. I'm okay if this goes into 3.6 as it is now.

thomassedlmayer commented 1 year ago

Actually, we did not want every possible pixel order to be present in this enum but only the ones that manipulate the image in a way that can not be done by repositioning the sensor with the sensor mounting position (e.g. turn sensor by 180 deg upside down). So we only provide the fields for mirroring and otherwise the default should be used. I think this information should still somehow be provided in the description otherwise people will probably think that some pixel orders are just missing. Another option may be to not call the field "pixel order" but mirroring state or similar and also state that this field influences the image data's pixel order? It should be clear what we do/do not want to achieve with this field.

jdsika commented 1 year ago

Actually, we did not want every possible pixel order to be present in this enum but only the ones that manipulate the image in a way that can not be done by repositioning the sensor with the sensor mounting position (e.g. turn sensor by 180 deg upside down). So we only provide the fields for mirroring and otherwise the default should be used. I think this information should still somehow be provided in the description otherwise people will probably think that some pixel orders are just missing. Another option may be to not call the field "pixel order" but mirroring state or similar and also state that this field influences the image data's pixel order? It should be clear what we do/do not want to achieve with this field.

Feel free to add to the comments. The default is now clearly defined and IMO it is way easier to understand now. Setting an enum to standard or to left to right is telling the user in a better way what the standard is.

ClemensLinnhoff commented 1 year ago

Actually, we did not want every possible pixel order to be present in this enum but only the ones that manipulate the image in a way that can not be done by repositioning the sensor with the sensor mounting position (e.g. turn sensor by 180 deg upside down). So we only provide the fields for mirroring and otherwise the default should be used. I think this information should still somehow be provided in the description otherwise people will probably think that some pixel orders are just missing. Another option may be to not call the field "pixel order" but mirroring state or similar and also state that this field influences the image data's pixel order? It should be clear what we do/do not want to achieve with this field.

This is still part of the documentation:

// \note this enum does not contain an entry for right-to-left and bottom-to-top, because this is equivalent to a // 180-degree rotation of the default, which should be indicated in the sensor coordinate // system. //

pmai commented 1 year ago

I'm unclear on the sudden changes to this PR; AFAICT the definitions in this PR were the result of various long running discussions in the sensor modelling WG. The now added changes do not seem to improve upon this, but rather seem to diverge, without fixing the enum issue (the default enum value should be 0).

So if this really is supposed to be rediscussed, it needs rediscussion in the sensor modeling group prior to being ready for CCB.

On the enum issue: The interface guidelines are just internal project guidelines and do not themselves have normative force; for ground-truth-like data this approach still makes sense, however for technical protocol-level configuration data, it does not, hence deviation is warranted, and has already happened, see the ReferenceLine Type enum, as an example.

Here the 0 value should be used for the old default behavior, since this keeps 3.5 and 3.6 interoperability consistent. This aids backward/forward-compatibility,

pmai commented 1 year ago

CCB on 2023-03-27: Merge as-is.