{"action":"created","issue":{"url":"https://api.github.com/repos/BerkeleyAutomation/dex-net/issues/2","repository_url":"https://api.github.com/repos/BerkeleyAutomation/dex-net","labels_url":"https://api.github.com/repos/BerkeleyAutomation/dex-net/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/BerkeleyAutomation/dex-net/issues/2/comments","events_url":"https://api.github.com/repos/BerkeleyAutomation/dex-net/issues/2/events","html_url":"https://github.com/BerkeleyAutomation/dex-net/issues/2","id":243775021,"number":2,"title":"Displaying grasps when 'check_approach=True'","user":{"login":"stepjam","id":6891386,"avatar_url":"https://avatars1.githubusercontent.com/u/6891386?v=4","gravatar_id":"","url":"https://api.github.com/users/stepjam","html_url":"https://github.com/stepjam","followers_url":"https://api.github.com/users/stepjam/followers","following_url":"https://api.github.com/users/stepjam/following{/other_user}","gists_url":"https://api.github.com/users/stepjam/gists{/gist_id}","starred_url":"https://api.github.com/users/stepjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stepjam/subscriptions","organizations_url":"https://api.github.com/users/stepjam/orgs","repos_url":"https://api.github.com/users/stepjam/repos","events_url":"https://api.github.com/users/stepjam/events{/privacy}","received_events_url":"https://api.github.com/users/stepjam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-18T16:25:13Z","updated_at":"2017-07-18T21:54:30Z","closed_at":null,"body":"Hello,\r\n\r\nI think I have found a problem in the code and just wanted to point it out and check my understanding.\r\n\r\nSo lets say I use the default config file supplied (`api_defaults.yaml`), but I set `check_approach = True` because I want a set of grasps that are perpendicular to the table and collision-free (like the GQ-CNN dataset).\r\nSo I import a model using `add_objects()`, I then sample some grasps using one of the grippers with `sample_grasps()`, and then finally compute some metrics using `compute_metrics()`.\r\n\r\nThe problem comes when I try to view these grasps.\r\n\r\nIn  `_compute_metrics()`, If `check_approach = False` then we use the metric name to index the quality score:\r\n\r\n```python\r\ngrasp_metrics[grasp.id][metric_name] = q.quality\r\n```\r\n\r\nand everything works fine later when I try and view the grasps.\r\nBut if `check_approach = True`, then we index by a created 'metric_tag':\r\n\r\n```python\r\nmetric_tag = '%s_%s' %(metric_name, stable_pose.id)\r\n#Other stuff\r\ngrasp_metrics[grasp.id][metric_tag] = q.quality\r\n```\r\n\r\nThis becomes a problem when you then try and view the grasps (in `display_grasps()`), here is the first problem in this function, but there are similar instances after it when we try and get the metric information:\r\n\r\n```python\r\nmetrics = self.dataset.available_metrics(object_name, gripper=gripper.name)\r\nif metric_name not in metrics:\r\n    raise ValueError(\"{} is not computed for gripper {}, object {}\".format(metric_name, gripper.name, object_name))\r\n```\r\n\r\nIt seems to assume that we had `check_approach = False` and that we access the quality via the metric name, and not the 'metric_tag'. I apologize if I have misunderstood something and this is not an error in the code. \r\n\r\nI have one extra query:\r\nI have assume that `check_approach = True` for when you generated the GQ-CNN dataset (as you were picking up from a table), so my question is what would `check_approach = False` be useful for? Picking from the side perhaps?\r\n\r\nHopefully I have made somewhat sense. Thank you for your time!"},"comment":{"url":"https://api.github.com/repos/BerkeleyAutomation/dex-net/issues/comments/316209587","html_url":"https://github.com/BerkeleyAutomation/dex-net/issues/2#issuecomment-316209587","issue_url":"https://api.github.com/repos/BerkeleyAutomation/dex-net/issues/2","id":316209587,"user":{"login":"Binaryhalibut","id":1366214,"avatar_url":"https://avatars1.githubusercontent.com/u/1366214?v=4","gravatar_id":"","url":"https://api.github.com/users/Binaryhalibut","html_url":"https://github.com/Binaryhalibut","followers_url":"https://api.github.com/users/Binaryhalibut/followers","following_url":"https://api.github.com/users/Binaryhalibut/following{/other_user}","gists_url":"https://api.github.com/users/Binaryhalibut/gists{/gist_id}","starred_url":"https://api.github.com/users/Binaryhalibut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Binaryhalibut/subscriptions","organizations_url":"https://api.github.com/users/Binaryhalibut/orgs","repos_url":"https://api.github.com/users/Binaryhalibut/repos","events_url":"https://api.github.com/users/Binaryhalibut/events{/privacy}","received_events_url":"https://api.github.com/users/Binaryhalibut/received_events","type":"User","site_admin":false},"created_at":"2017-07-18T21:54:30Z","updated_at":"2017-07-18T21:54:30Z","body":"The grasps in the dataset are perpendicular to the table, but the metrics used are independent of whether or not the grasp is perpendicular to the table.\r\n\r\nBasically, everything that makes the grasps in the dataset perpendicular to the table (collision checking) isn't in the current released code."}}
{"actor":{"display_login":"Binaryhalibut"}}