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.
When learning lengths of
Box
geometries, the learned lengths could (and often did) go negative. It appears the same could happen withSphere
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.