Unity-Technologies / URDF-Importer

URDF importer
Apache License 2.0
214 stars 71 forks source link

AIRO-1782 Fix behavior of 'Use URDF Values' check-box (and re-name) #195

Closed mrpropellers closed 2 years ago

mrpropellers commented 2 years ago

Proposed change(s)

CDP user Robyn described an issue where the "Use URDF Values" check-box didn't behave the way they expected (values are greyed out when box is not checked, and are only "editable" when being "used," although the values were being reset immediately when changed).

Re-named the checkbox to "Override URDF Values" to be more in-line with the toggle-group behavior, and corrected behavior so that when the values are editable, the edits made are appropriately propagated to the underlying ArticulationBody. Also added a button that resets the override values back to those originally defined in the URDF, and added logic so that when the Overrides box is unchecked, it appropriately toggles back to the original URDF values. Also also added a type alias at the top of the file and cleaned up superfluous if #UNITY_EDITOR pre-processor directives.

Tested manually in editor.

Useful links (GitHub issues, JIRA tickets, forum threads, etc.)

Provide any relevant links here.

Types of change(s)

Checklist

https://user-images.githubusercontent.com/29758400/162850424-e9de5550-4e63-4cf7-a0f4-ad56128c4bb9.mp4

mrpropellers commented 2 years ago

PR was approved and auto-dismissed by bad branch protections on dev -- overriding to merge.