facebookresearch / habitat-sim

A flexible, high-performance 3D simulator for Embodied AI research.
https://aihabitat.org/
MIT License
2.64k stars 424 forks source link

--Configurations : Expand and unify vector/array-backed value handling #2395

Closed jturner65 closed 6 months ago

jturner65 commented 6 months ago

Motivation and Context

As an extension of this PR, which provided vector/array-backed support to subconfigurations, and in preparation for #2382 , which brings substantial expansion to the Configuration subsystem capabilities, this PR expands and unifies the handling of vector/array-based configuration fields.

Now, a json construct that is expected to be either an array or an array-like key-value store (where the keys are string representations of the indices of the subsquent array) will be handled by the same code, and a paradigm of consistency is introduced to provide vector set/get access to configuration-based vector-like constructs. A float specialization is also added for the Configuration set/getSubconfigValsOfTypeInVector so that the stored doubles can be provided as floats to the float-expecting consumer, and the existing attributes that had custom handling for arrays of data now use the same generalized functionality.

How Has This Been Tested

Types of changes

Checklist