{"action":"created","comment":{"url":"https://api.github.com/repos/ros-controls/ros_controllers/pulls/comments/24075317","id":24075317,"diff_hunk":"@@ -98,6 +103,7 @@ class ForwardJointGroupCommandController: public controller_interface::Controlle\n         return false;\n       }\n     }\n+    commands_buffer_.readFromRT()->resize(n_joints_, 0.0);","path":"forward_command_controller/include/forward_command_controller/forward_joint_group_command_controller.h","position":34,"original_position":34,"commit_id":"1ba1b1860e2b84bedeb4a39580c71090ac47c285","original_commit_id":"1ba1b1860e2b84bedeb4a39580c71090ac47c285","user":{"login":"adolfo-rt","id":1128028,"avatar_url":"https://avatars.githubusercontent.com/u/1128028?v=3","gravatar_id":"","url":"https://api.github.com/users/adolfo-rt","html_url":"https://github.com/adolfo-rt","followers_url":"https://api.github.com/users/adolfo-rt/followers","following_url":"https://api.github.com/users/adolfo-rt/following{/other_user}","gists_url":"https://api.github.com/users/adolfo-rt/gists{/gist_id}","starred_url":"https://api.github.com/users/adolfo-rt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adolfo-rt/subscriptions","organizations_url":"https://api.github.com/users/adolfo-rt/orgs","repos_url":"https://api.github.com/users/adolfo-rt/repos","events_url":"https://api.github.com/users/adolfo-rt/events{/privacy}","received_events_url":"https://api.github.com/users/adolfo-rt/received_events","type":"User","site_admin":false},"body":"You can first `readFromNonRT()`, set the new values and then  `writeFronNonRT()`. You'll wait twice for the lock, once in each call, but that's still OK.\r\n\r\nIn fact, in the above usecase you don't actually need to read the buffer at all. You can simply prepare a vector and call `writeFromNonRT()`.","created_at":"2015-02-04T10:50:51Z","updated_at":"2015-02-04T10:50:51Z","html_url":"https://github.com/ros-controls/ros_controllers/pull/161#discussion_r24075317","pull_request_url":"https://api.github.com/repos/ros-controls/ros_controllers/pulls/161","_links":{"self":{"href":"https://api.github.com/repos/ros-controls/ros_controllers/pulls/comments/24075317"},"html":{"href":"https://github.com/ros-controls/ros_controllers/pull/161#discussion_r24075317"},"pull_request":{"href":"https://api.github.com/repos/ros-controls/ros_controllers/pulls/161"}}},"pull_request":{"url":"https://api.github.com/repos/ros-controls/ros_controllers/pulls/161","id":28209099,"html_url":"https://github.com/ros-controls/ros_controllers/pull/161","diff_url":"https://github.com/ros-controls/ros_controllers/pull/161.diff","patch_url":"https://github.com/ros-controls/ros_controllers/pull/161.patch","issue_url":"https://api.github.com/repos/ros-controls/ros_controllers/issues/161","number":161,"state":"open","locked":false,"title":"thread-safe forward controllers","user":{"login":"ipa-mdl","id":727227,"avatar_url":"https://avatars.githubusercontent.com/u/727227?v=3","gravatar_id":"","url":"https://api.github.com/users/ipa-mdl","html_url":"https://github.com/ipa-mdl","followers_url":"https://api.github.com/users/ipa-mdl/followers","following_url":"https://api.github.com/users/ipa-mdl/following{/other_user}","gists_url":"https://api.github.com/users/ipa-mdl/gists{/gist_id}","starred_url":"https://api.github.com/users/ipa-mdl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipa-mdl/subscriptions","organizations_url":"https://api.github.com/users/ipa-mdl/orgs","repos_url":"https://api.github.com/users/ipa-mdl/repos","events_url":"https://api.github.com/users/ipa-mdl/events{/privacy}","received_events_url":"https://api.github.com/users/ipa-mdl/received_events","type":"User","site_admin":false},"body":"Fix for issue #157, supersedes #160 \r\n\r\nForwardCommandController was not thread-safe for 32bit systems, but  maybe for 64bit.\r\nForwardJointGroupCommandController was not thread-safe at all.\r\n\r\n* thread-safe/realtime-safe topic handling\r\n* check for empty list of joints\r\n* properly resets to neutral zeros at restart (resize only works the first time)\r\n* dependency on realtime_tools\r\n* command(s)_ was renamed to command(s)\\_buffer_.\r\n\r\nPlease note: this version uses references to the realtime-data, this works only for single-consumer cases. They could be replaced by copies, but this introduces some overhead..","created_at":"2015-01-28T16:49:19Z","updated_at":"2015-02-04T10:50:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe564b638c7205428af9753e68373ea1d011c383","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ros-controls/ros_controllers/pulls/161/commits","review_comments_url":"https://api.github.com/repos/ros-controls/ros_controllers/pulls/161/comments","review_comment_url":"https://api.github.com/repos/ros-controls/ros_controllers/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ros-controls/ros_controllers/issues/161/comments","statuses_url":"https://api.github.com/repos/ros-controls/ros_controllers/statuses/1ba1b1860e2b84bedeb4a39580c71090ac47c285","head":{"label":"ipa-mdl:rt_group_controller","ref":"rt_group_controller","sha":"1ba1b1860e2b84bedeb4a39580c71090ac47c285","user":{"login":"ipa-mdl","id":727227,"avatar_url":"https://avatars.githubusercontent.com/u/727227?v=3","gravatar_id":"","url":"https://api.github.com/users/ipa-mdl","html_url":"https://github.com/ipa-mdl","followers_url":"https://api.github.com/users/ipa-mdl/followers","following_url":"https://api.github.com/users/ipa-mdl/following{/other_user}","gists_url":"https://api.github.com/users/ipa-mdl/gists{/gist_id}","starred_url":"https://api.github.com/users/ipa-mdl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipa-mdl/subscriptions","organizations_url":"https://api.github.com/users/ipa-mdl/orgs","repos_url":"https://api.github.com/users/ipa-mdl/repos","events_url":"https://api.github.com/users/ipa-mdl/events{/privacy}","received_events_url":"https://api.github.com/users/ipa-mdl/received_events","type":"User","site_admin":false},"repo":{"id":24319540,"name":"ros_controllers","full_name":"ipa-mdl/ros_controllers","owner":{"login":"ipa-mdl","id":727227,"avatar_url":"https://avatars.githubusercontent.com/u/727227?v=3","gravatar_id":"","url":"https://api.github.com/users/ipa-mdl","html_url":"https://github.com/ipa-mdl","followers_url":"https://api.github.com/users/ipa-mdl/followers","following_url":"https://api.github.com/users/ipa-mdl/following{/other_user}","gists_url":"https://api.github.com/users/ipa-mdl/gists{/gist_id}","starred_url":"https://api.github.com/users/ipa-mdl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipa-mdl/subscriptions","organizations_url":"https://api.github.com/users/ipa-mdl/orgs","repos_url":"https://api.github.com/users/ipa-mdl/repos","events_url":"https://api.github.com/users/ipa-mdl/events{/privacy}","received_events_url":"https://api.github.com/users/ipa-mdl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ipa-mdl/ros_controllers","description":"Generic robotic controllers to accompany ros_control","fork":true,"url":"https://api.github.com/repos/ipa-mdl/ros_controllers","forks_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/forks","keys_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/teams","hooks_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/hooks","issue_events_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/issues/events{/number}","events_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/events","assignees_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/assignees{/user}","branches_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/branches{/branch}","tags_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/tags","blobs_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/statuses/{sha}","languages_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/languages","stargazers_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/stargazers","contributors_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/contributors","subscribers_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/subscribers","subscription_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/subscription","commits_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/issues/comments/{number}","contents_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/contents/{+path}","compare_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/merges","archive_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/downloads","issues_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/issues{/number}","pulls_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/pulls{/number}","milestones_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/milestones{/number}","notifications_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/labels{/name}","releases_url":"https://api.github.com/repos/ipa-mdl/ros_controllers/releases{/id}","created_at":"2014-09-22T07:58:14Z","updated_at":"2015-01-27T14:41:18Z","pushed_at":"2015-01-28T16:40:11Z","git_url":"git://github.com/ipa-mdl/ros_controllers.git","ssh_url":"git@github.com:ipa-mdl/ros_controllers.git","clone_url":"https://github.com/ipa-mdl/ros_controllers.git","svn_url":"https://github.com/ipa-mdl/ros_controllers","homepage":"http://wiki.ros.org/ros_control","size":1467,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"indigo-devel"}},"base":{"label":"ros-controls:indigo-devel","ref":"indigo-devel","sha":"758d255b4998461807b3cd3d481264e1b37a9144","user":{"login":"ros-controls","id":4827547,"avatar_url":"https://avatars.githubusercontent.com/u/4827547?v=3","gravatar_id":"","url":"https://api.github.com/users/ros-controls","html_url":"https://github.com/ros-controls","followers_url":"https://api.github.com/users/ros-controls/followers","following_url":"https://api.github.com/users/ros-controls/following{/other_user}","gists_url":"https://api.github.com/users/ros-controls/gists{/gist_id}","starred_url":"https://api.github.com/users/ros-controls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros-controls/subscriptions","organizations_url":"https://api.github.com/users/ros-controls/orgs","repos_url":"https://api.github.com/users/ros-controls/repos","events_url":"https://api.github.com/users/ros-controls/events{/privacy}","received_events_url":"https://api.github.com/users/ros-controls/received_events","type":"Organization","site_admin":false},"repo":{"id":6659004,"name":"ros_controllers","full_name":"ros-controls/ros_controllers","owner":{"login":"ros-controls","id":4827547,"avatar_url":"https://avatars.githubusercontent.com/u/4827547?v=3","gravatar_id":"","url":"https://api.github.com/users/ros-controls","html_url":"https://github.com/ros-controls","followers_url":"https://api.github.com/users/ros-controls/followers","following_url":"https://api.github.com/users/ros-controls/following{/other_user}","gists_url":"https://api.github.com/users/ros-controls/gists{/gist_id}","starred_url":"https://api.github.com/users/ros-controls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros-controls/subscriptions","organizations_url":"https://api.github.com/users/ros-controls/orgs","repos_url":"https://api.github.com/users/ros-controls/repos","events_url":"https://api.github.com/users/ros-controls/events{/privacy}","received_events_url":"https://api.github.com/users/ros-controls/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros-controls/ros_controllers","description":"Generic robotic controllers to accompany ros_control","fork":false,"url":"https://api.github.com/repos/ros-controls/ros_controllers","forks_url":"https://api.github.com/repos/ros-controls/ros_controllers/forks","keys_url":"https://api.github.com/repos/ros-controls/ros_controllers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros-controls/ros_controllers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros-controls/ros_controllers/teams","hooks_url":"https://api.github.com/repos/ros-controls/ros_controllers/hooks","issue_events_url":"https://api.github.com/repos/ros-controls/ros_controllers/issues/events{/number}","events_url":"https://api.github.com/repos/ros-controls/ros_controllers/events","assignees_url":"https://api.github.com/repos/ros-controls/ros_controllers/assignees{/user}","branches_url":"https://api.github.com/repos/ros-controls/ros_controllers/branches{/branch}","tags_url":"https://api.github.com/repos/ros-controls/ros_controllers/tags","blobs_url":"https://api.github.com/repos/ros-controls/ros_controllers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros-controls/ros_controllers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros-controls/ros_controllers/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros-controls/ros_controllers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros-controls/ros_controllers/statuses/{sha}","languages_url":"https://api.github.com/repos/ros-controls/ros_controllers/languages","stargazers_url":"https://api.github.com/repos/ros-controls/ros_controllers/stargazers","contributors_url":"https://api.github.com/repos/ros-controls/ros_controllers/contributors","subscribers_url":"https://api.github.com/repos/ros-controls/ros_controllers/subscribers","subscription_url":"https://api.github.com/repos/ros-controls/ros_controllers/subscription","commits_url":"https://api.github.com/repos/ros-controls/ros_controllers/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros-controls/ros_controllers/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros-controls/ros_controllers/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros-controls/ros_controllers/issues/comments/{number}","contents_url":"https://api.github.com/repos/ros-controls/ros_controllers/contents/{+path}","compare_url":"https://api.github.com/repos/ros-controls/ros_controllers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros-controls/ros_controllers/merges","archive_url":"https://api.github.com/repos/ros-controls/ros_controllers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros-controls/ros_controllers/downloads","issues_url":"https://api.github.com/repos/ros-controls/ros_controllers/issues{/number}","pulls_url":"https://api.github.com/repos/ros-controls/ros_controllers/pulls{/number}","milestones_url":"https://api.github.com/repos/ros-controls/ros_controllers/milestones{/number}","notifications_url":"https://api.github.com/repos/ros-controls/ros_controllers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros-controls/ros_controllers/labels{/name}","releases_url":"https://api.github.com/repos/ros-controls/ros_controllers/releases{/id}","created_at":"2012-11-12T19:20:05Z","updated_at":"2015-01-24T21:01:39Z","pushed_at":"2015-01-15T09:49:42Z","git_url":"git://github.com/ros-controls/ros_controllers.git","ssh_url":"git@github.com:ros-controls/ros_controllers.git","clone_url":"https://github.com/ros-controls/ros_controllers.git","svn_url":"https://github.com/ros-controls/ros_controllers","homepage":"http://wiki.ros.org/ros_control","size":2260,"stargazers_count":16,"watchers_count":16,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":32,"forks":52,"open_issues":32,"watchers":16,"default_branch":"indigo-devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ros-controls/ros_controllers/pulls/161"},"html":{"href":"https://github.com/ros-controls/ros_controllers/pull/161"},"issue":{"href":"https://api.github.com/repos/ros-controls/ros_controllers/issues/161"},"comments":{"href":"https://api.github.com/repos/ros-controls/ros_controllers/issues/161/comments"},"review_comments":{"href":"https://api.github.com/repos/ros-controls/ros_controllers/pulls/161/comments"},"review_comment":{"href":"https://api.github.com/repos/ros-controls/ros_controllers/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ros-controls/ros_controllers/pulls/161/commits"},"statuses":{"href":"https://api.github.com/repos/ros-controls/ros_controllers/statuses/1ba1b1860e2b84bedeb4a39580c71090ac47c285"}}}}