{"action":"created","issue":{"url":"https://api.github.com/repos/wg-perception/linemod/issues/9","labels_url":"https://api.github.com/repos/wg-perception/linemod/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/wg-perception/linemod/issues/9/comments","events_url":"https://api.github.com/repos/wg-perception/linemod/issues/9/events","html_url":"https://github.com/wg-perception/linemod/pull/9","id":54907306,"number":9,"title":"Fixed input params for training","user":{"login":"nlyubova","id":6662810,"avatar_url":"https://avatars.githubusercontent.com/u/6662810?v=3","gravatar_id":"","url":"https://api.github.com/users/nlyubova","html_url":"https://github.com/nlyubova","followers_url":"https://api.github.com/users/nlyubova/followers","following_url":"https://api.github.com/users/nlyubova/following{/other_user}","gists_url":"https://api.github.com/users/nlyubova/gists{/gist_id}","starred_url":"https://api.github.com/users/nlyubova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nlyubova/subscriptions","organizations_url":"https://api.github.com/users/nlyubova/orgs","repos_url":"https://api.github.com/users/nlyubova/repos","events_url":"https://api.github.com/users/nlyubova/events{/privacy}","received_events_url":"https://api.github.com/users/nlyubova/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-20T16:46:39Z","updated_at":"2015-01-25T01:30:58Z","closed_at":"2015-01-20T16:47:30Z","pull_request":{"url":"https://api.github.com/repos/wg-perception/linemod/pulls/9","html_url":"https://github.com/wg-perception/linemod/pull/9","diff_url":"https://github.com/wg-perception/linemod/pull/9.diff","patch_url":"https://github.com/wg-perception/linemod/pull/9.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/wg-perception/linemod/issues/comments/71346090","html_url":"https://github.com/wg-perception/linemod/pull/9#issuecomment-71346090","issue_url":"https://api.github.com/repos/wg-perception/linemod/issues/9","id":71346090,"user":{"login":"albertodesouza","id":10265815,"avatar_url":"https://avatars.githubusercontent.com/u/10265815?v=3","gravatar_id":"","url":"https://api.github.com/users/albertodesouza","html_url":"https://github.com/albertodesouza","followers_url":"https://api.github.com/users/albertodesouza/followers","following_url":"https://api.github.com/users/albertodesouza/following{/other_user}","gists_url":"https://api.github.com/users/albertodesouza/gists{/gist_id}","starred_url":"https://api.github.com/users/albertodesouza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertodesouza/subscriptions","organizations_url":"https://api.github.com/users/albertodesouza/orgs","repos_url":"https://api.github.com/users/albertodesouza/repos","events_url":"https://api.github.com/users/albertodesouza/events{/privacy}","received_events_url":"https://api.github.com/users/albertodesouza/received_events","type":"User","site_admin":false},"created_at":"2015-01-25T01:30:58Z","updated_at":"2015-01-25T01:30:58Z","body":"In line 212 of linemod_train.cpp, addTemplate() might return -1. This turns the indexes of the poses of the templates saved in the database out of sync with the id of the detected objects. This typically shows up in rviz as not properly oriented object detections. To correct the problem I suggest changing this peace of code:\r\n```C++\r\ndetector_->addTemplate(sources, \"object1\", mask);\r\n\r\n\r\n// Also store the pose of each template\r\nRs_->push_back(cv::Mat(R));\r\nTs_->push_back(cv::Mat(T));\r\ndistances_->push_back(distance);\r\nKs_->push_back(cv::Mat(K));\r\n```\r\nto that one:\r\n```C++\r\nint template_in = detector_->addTemplate(sources, \"object1\", mask);\r\nif (template_in == -1)\r\n{\r\n  // Delete the status\r\n  for (size_t j = 0; j < status.str().size(); ++j)\r\n    std::cout << '\\b';\r\n  continue;\r\n}\r\n\r\n// Also store the pose of each template\r\nRs_->push_back(cv::Mat(R));\r\nTs_->push_back(cv::Mat(T));\r\ndistances_->push_back(distance);\r\nKs_->push_back(cv::Mat(K));\r\n```\r\nAlberto.\r\n\r\n"}}