Closed JessyVision closed 6 years ago
I wouldn't call that a bug. It is more the semantic of python ;) So is this issue intended as a reminder to apply the copy() function or should we add some sanity checks that will trigger (throw an exception) in case something is overwritten? (One way to do so would be a call to function in the very end that validates that no two configuration refer to the same object)
Btw. There is a similar risk in massflow.py in soma_utils (when defining the synergie). To mitigate the problem there, I introduced a convenient method called add() that deals with this problem.
We should keep this in mind and fix all issues if there is any open due to this python feature.
if the sanity check can be implemented fast (few minutes) then please do so. Thanks.
sanity checks are merged. Can we close the issue now?
yes, thanks for fixing it.
If a specific object is instantiated from the general
object
we need to apply the.copy()
function. This bug effects thehandarm_param.py
!We need to 2x check that in master and the demo branches have this bugfix, otherwise the tuning of a new object will overwrite all object parameters like:
self['edge_grasp']['plushtoy'] = self['edge_grasp']['object'].copy()