DAIRLab / dair_pll

DAIRLab Physics-based Learning Library
BSD 3-Clause "New" or "Revised" License
10 stars 5 forks source link

Enforce learned box and sphere lengths to be positive #8

Closed ebianchi closed 1 year ago

ebianchi commented 1 year ago

When learning lengths of Box geometries, the learned lengths could (and often did) go negative. It appears the same could happen with Sphere geometries as well. This PR remedies this issue by distinguishing the learned parameters (which can take gradient steps during the learning process) from the geometric quantities (which are used for exporting URDF files and later for simulation). Specifically, the learned parameters are free to reside in (-\infty, \infty), then the geometric quantities are calculated as the absolute value of those learned parameters.