RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.33k stars 1.26k forks source link

Allow HSV color initialization in `LightParameter` from YAML #20481

Open IanTheEngineer opened 1 year ago

IanTheEngineer commented 1 year ago

Currently, LightParameter's color attribute accepts Rgba YAML initialization only. Providing an HSV YAML spelling would enable useful things like sampling from Gaussian distributions over the HSV space when resolving stochastic color parameters for lighting.

This might take the form of something like the following using a YAML tag:

color: !Hsv
  hsv: [0.08333, 1.0, 1.0] #  orange

vs the current:

color: 
  rgba: [1.0, 0.5, 0.0] #  orange, with optional alpha
jwnimmer-tri commented 1 year ago

Assigning to +@zachfang for triage per https://drake.mit.edu/issues.html.

jwnimmer-tri commented 1 year ago

(From my perspective, this is low priority because teaching the domain-randomization tools to randomize in HSV and then convert to RGB when writing out to YAML is likely to be pretty easy.)