{"action":"created","issue":{"url":"https://api.github.com/repos/JenniferBuehler/graspit-pkgs/issues/13","repository_url":"https://api.github.com/repos/JenniferBuehler/graspit-pkgs","labels_url":"https://api.github.com/repos/JenniferBuehler/graspit-pkgs/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/JenniferBuehler/graspit-pkgs/issues/13/comments","events_url":"https://api.github.com/repos/JenniferBuehler/graspit-pkgs/issues/13/events","html_url":"https://github.com/JenniferBuehler/graspit-pkgs/issues/13","id":162704501,"number":13,"title":"Changing annealing parameters","user":{"login":"belledon","id":19876414,"avatar_url":"https://avatars.githubusercontent.com/u/19876414?v=3","gravatar_id":"","url":"https://api.github.com/users/belledon","html_url":"https://github.com/belledon","followers_url":"https://api.github.com/users/belledon/followers","following_url":"https://api.github.com/users/belledon/following{/other_user}","gists_url":"https://api.github.com/users/belledon/gists{/gist_id}","starred_url":"https://api.github.com/users/belledon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/belledon/subscriptions","organizations_url":"https://api.github.com/users/belledon/orgs","repos_url":"https://api.github.com/users/belledon/repos","events_url":"https://api.github.com/users/belledon/events{/privacy}","received_events_url":"https://api.github.com/users/belledon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":46,"created_at":"2016-06-28T14:46:52Z","updated_at":"2016-07-30T19:50:11Z","closed_at":null,"body":"Looking through the source from the graspit_simulator github I found that the grasp planning proceeds as  follows (I could be wrong): The abstract planning classes call upon `SimAnnPlanner` which then loops using `simAnn`. Within `simAnn` lies `setParameters` which uses a switch to set the annealing parameters. \r\n\r\n```cpp\r\nvoid SimAnn::setParameters(AnnealingType type)\r\n{\r\n\tswitch (type) {\r\n\t\tcase ANNEAL_DEFAULT:\r\n\t\t\t//these are the default parameters that experimentation shows work best over 8 dimensions\r\n\t\t\t//identical schedule for error and neighbors\r\n\t\t\t//error is supposed to be distance between fingers and object, so raw order of 1-100 mm\r\n\t\t\tYC = 7.0;\r\n\t\t\tHC = 7.0;\r\n\t\t\tYDIMS = 8;\r\n\t\t\tHDIMS = 8;\r\n\t\t\tNBR_ADJ = 1.0;\r\n\t\t\tERR_ADJ = 1.0e-6;\r\n\t\t\tDEF_T0 = 1.0e6;\r\n\t\t\tDEF_K0 = 30000;\r\n\t\t\tbreak;\r\n\t\tcase ANNEAL_LOOP:\r\n\t\t\t//for looping we use a slightly shorter interval\r\n\t\t\tYC = 7.0;\r\n\t\t\tHC = 7.0;\r\n\t\t\tYDIMS = 8;\r\n\t\t\tHDIMS = 8;\r\n\t\t\tNBR_ADJ = 1.0;\r\n\t\t\tERR_ADJ = 1.0e-6;\r\n\t\t\tDEF_T0 = 1.0e6;\r\n\t\t\tDEF_K0 = 35000;\r\n\t\t\tbreak;\r\n\t\tcase ANNEAL_MODIFIED:\r\n\t\t\t//different version which doesn't really work better than default\r\n\t\t\tYC = 2.38;\r\n\t\t\tYDIMS = 8;\r\n\t\t\tHC = 2.38;\r\n\t\t\tHDIMS = 8;\r\n\t\t\tNBR_ADJ = 1.0e-3;\r\n\t\t\tERR_ADJ = 1.0e-1;\r\n\t\t\tDEF_T0 = 1.0e3;\r\n\t\t\tDEF_K0 = 0;\r\n\t\t\tbreak;\r\n\t\tcase ANNEAL_STRICT:\r\n\t\t\tDBGP(\"Strict Sim Ann parameters!\");\r\n\t\t\t//this are for searches that ONLY look at grasp quality measure\r\n\t\t\tYC = 0.72; \r\n\t\t\tHC = 0.22;\r\n\t\t\tYDIMS = 2;\r\n\t\t\tHDIMS = 2;\r\n\t\t\tNBR_ADJ = 1.0;\r\n\t\t\tERR_ADJ = 1.0; //meant to work with ENERGY_STRICT_AUTOGRASP which multiplies eps. gq by 1.0e2\r\n\t\t\tDEF_T0 = 10.0;\r\n\t\t\tDEF_K0 = 0; \r\n\t\t\tbreak;\r\n\t\tcase ANNEAL_ONLINE:\r\n\t\t\t//parameters for on-line search. Supposed to work really fast and in fewer dimensions\r\n\t\t\t//YC = 0.54;\r\n\t\t\tYC = 0.24;\r\n\t\t\tHC = 0.54;\r\n\t\t\t//YDIMS = 3;\r\n\t\t\tYDIMS = 2;\r\n\t\t\tHDIMS = 3;\r\n\t\t\tNBR_ADJ = 1.0;\r\n\t\t\tERR_ADJ = 1.0e-2;\r\n\t\t\tDEF_T0 = 1.0e1;\r\n\t\t\tDEF_K0 = 100;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tfprintf(stderr,\"Unknown Annealing params requested, using default!\\n\");\r\n\t\t\tsetParameters(ANNEAL_DEFAULT);\r\n\t\t\tbreak;\r\n\t}\r\n}\r\n```\r\nI was thinking that creating a modified version of `simAnnPlanner` that calls on a different `simAnn` can enable a way to iterate through different parameters. I noticed that your version of `EigenGraspPlanner.cpp`, you include the helper files for both of the previously mentioned sources. In order to use the modified version of `simAnnPlanner` and `simAnn` would I have to compile it through graspit first and then compile a modified `EigenGraspPlanner.cpp` in grasp_planning_graspit?"},"comment":{"url":"https://api.github.com/repos/JenniferBuehler/graspit-pkgs/issues/comments/236386625","html_url":"https://github.com/JenniferBuehler/graspit-pkgs/issues/13#issuecomment-236386625","issue_url":"https://api.github.com/repos/JenniferBuehler/graspit-pkgs/issues/13","id":236386625,"user":{"login":"belledon","id":19876414,"avatar_url":"https://avatars.githubusercontent.com/u/19876414?v=3","gravatar_id":"","url":"https://api.github.com/users/belledon","html_url":"https://github.com/belledon","followers_url":"https://api.github.com/users/belledon/followers","following_url":"https://api.github.com/users/belledon/following{/other_user}","gists_url":"https://api.github.com/users/belledon/gists{/gist_id}","starred_url":"https://api.github.com/users/belledon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/belledon/subscriptions","organizations_url":"https://api.github.com/users/belledon/orgs","repos_url":"https://api.github.com/users/belledon/repos","events_url":"https://api.github.com/users/belledon/events{/privacy}","received_events_url":"https://api.github.com/users/belledon/received_events","type":"User","site_admin":false},"created_at":"2016-07-30T19:50:11Z","updated_at":"2016-07-30T19:50:11Z","body":"I agree. Most of my changes have been to `SimAnn`. I did add optional parameters to `EigenGraspPlanner::plan` so I could pass the annealing parameters when calling plan  without effecting the original `grasp_planning` call. However, I was wondering if in your opinion it would be better for me to add a new method, `EigenGraspPlanner::configPlanner(std::vector<double> params)` that passes the annealing parameters to the `graspitEgPlanner` object which would then use the functions within `SimAnn` (ie `SimAnn::useParameters(AnnealingType t, ...)`). \r\n\r\nUsing the current structure:\r\n`EigenGraspPlanner::plan -> EigenGraspPlanner::initPlanner -> EigenGraspPlanner::initPlannerType -> SimAnnPlanner::useAnnealingParameters -> SimAnn::useParameters`\r\n\r\nThe alternate would be:\r\n`EigenGraspPlanner::configPlanning -> SimAnnPlanner::useAnnealingParameters -> SimAnn::useParameters`\r\n\r\nBut I would have to add a snippet where `EigenGraspPlanner::plan` checks to make sure that `graspitEgPlanner` was modified so that it doesn't call `EigenGraspPlanner::initPlanner`...and so on. "}}
{"actor":{"display_login":"belledon"}}