SoMa-Project / ec_grasp_planner

Grasp Planner Based on Environmental Constraint Exploitation
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

Sanitycheck handarmparam #35

Closed JannisW closed 6 years ago

JannisW commented 6 years ago

This PR will mitigate the danger of issue #33 By calling checkValidity() after creating an handarm_paramter object it is ensured that an exception is thrown in case a copy() was forgotten. This does not check for a copy paste error in the strategy section, like

self['wall_grasp']['mango'] = self['surface_grasp']['object'].copy()

However, the call for copy() is checked A way to prevent this and the issue #33 would be to introduce a convenient function like this:

 def copyFromGenericObject(self, strategy, object):
        self[strategy][object] = self[strategy]['object'].copy()

which would be called like this

self.copyFromGenericObject('surface_grasp', 'mango')

If you think this might be useful as well, I can add it to this PR.

IMPORTANT: This PR should not be merged before #34

I based this branch on the wall_grasp_tuning_DEMO branch, which is not merged yet to prevent merge conflicts. Merging this will also merge all the other changes to master. My suggestion is, to merge #34, tag the state, and then merge this PR into master.

JannisW commented 6 years ago

MS4 tag was created (called: ms4_review-meeting-2018)