-
Notifications
You must be signed in to change notification settings - Fork 124
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
Environmental conditions DRAFT for V4.0.0. #601
base: master
Are you sure you want to change the base?
Environmental conditions DRAFT for V4.0.0. #601
Conversation
Moved the enum values to an own message of AmbientIllumination Signed-off-by: Markus Waldmann <Markus.Waldmann@stud.hs-kempten.de>
// other cars, street lights etc. | ||
// | ||
message AmbientIllumination | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're missing the actual field value which uses the enum from this message.
For example AmbientIlluminationLevel level = 1;
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are absolutely right. I haven't added a field yet, because how to name the ENUM field and how to name the field for the numerical value range?
AmbientIlluminationLevel level = 1
double intensity = 2
{ | ||
// Ambient illumination is unknown (must not be used in ground truth). | ||
// | ||
AMBIENT_ILLUMINATION_UNKNOWN = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The enum types should be prefixed with the full enum name and include another underscore right before the actual type. So if the enum name is AmbientIlluminationLevel
it should be AMBIENT_ILLUMINATION_LEVEL_1
, AMBIENT_ILLUMINATION_LEVEL_OTHER
etc.
see https://opensimulationinterface.github.io/osi-documentation/#_interface_conventions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but then the naming goes like this
AMBIENT_ILLUMINATION_LEVEL_UNKNOWN = 0
...
AMBIENT_ILLUMINATION_LEVEL_LEVEL1
AMBIENT_ILLUMINATION_LEVEL_LEVEL2
sounds wired, how to solve this?
AMBIENT_ILLUMINATION_LEVEL_1
AMBIENT_ILLUMINATION_LEVEL_2
maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMBIENT_ILLUMINATION_LEVEL_1
would not sound too bad, I think. Though, I don't know if we actually need the "AmbientIllumination" term in the types if the enum is located within the AmbientIllumination
message anyway. Maybe we could name the enum Level
and have the types LEVEL_UNKOWN
, LEVEL_OTHER
, LEVEL_1
...LEVEL_9
? It has been done similarly with Type
, Material
, etc. in other messages like StationaryObject
.
With this draft the
osi_environment.proto
gets a major overhaul for OSI V4.0.0.The basic idea is to move all attributes of the environment to an own message to create new messages easier for all attributes of the environmental conditions.
For now this is done exemplarily for the ambient illumination message.
Within this message there is the old Enum type, but it is easier now to create a numerical value range.
This draft is created and handled by the harmonization group.
TODO's:
Will be for filled by PR #593 and merged into this PR after release of V3.5.0.
Related: