{"action":"opened","number":711,"pull_request":{"url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/711","id":51060008,"html_url":"https://github.com/opensim-org/opensim-core/pull/711","diff_url":"https://github.com/opensim-org/opensim-core/pull/711.diff","patch_url":"https://github.com/opensim-org/opensim-core/pull/711.patch","issue_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/711","number":711,"state":"open","locked":false,"title":"Working version of TaskSpace controller for OpenSim","user":{"login":"mitkof6","id":4024976,"avatar_url":"https://avatars.githubusercontent.com/u/4024976?v=3","gravatar_id":"","url":"https://api.github.com/users/mitkof6","html_url":"https://github.com/mitkof6","followers_url":"https://api.github.com/users/mitkof6/followers","following_url":"https://api.github.com/users/mitkof6/following{/other_user}","gists_url":"https://api.github.com/users/mitkof6/gists{/gist_id}","starred_url":"https://api.github.com/users/mitkof6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitkof6/subscriptions","organizations_url":"https://api.github.com/users/mitkof6/orgs","repos_url":"https://api.github.com/users/mitkof6/repos","events_url":"https://api.github.com/users/mitkof6/events{/privacy}","received_events_url":"https://api.github.com/users/mitkof6/received_events","type":"User","site_admin":false},"body":"The computation of the task space was previously implemented by @chrisdembia and @sherm1 for Simbody as an example. I have ported it as an OpenSim ModelComponent, because of the way the cache is allocated by Simbody, is not consistent with OpenSim model building, which probably discards any allocation when the model is built. Correct me if I am wrong, but I believe it is because there is an extra mechanism that wraps the allocation through Component addCacheVariable. \r\n\r\nI have converted all computations so as not to have an internal state reference, but this being a part of the function call. As a consequence the convenient operators were converted to function calls. \r\n\r\nThe test demonstrates the usage of task space control for a desired task that is specified by a desired acceleration. The underlying computations are performed by the Simbody TaskSpace implementation, which was altered, so as to be used by the OpenSim engine. The TaskSpace operators were substituted by object oriented class calls, as a drawback of the current implementation. For this test the arm's end effector is specified to have a constant acceleration in the y direction and the gravity compensation is considered.\r\n\r\nI would like to discuss with you how this can be improved and consequently integrated into OpenSim, because I find it very useful. Some suggestions that I have in mind:\r\n\r\n* Find a way to keep the original operators of the task space quantities (e.g. JT * u), as in the original implementations, but without having an internal reference to the state or if there is a reference state, to ensure that it is correctly used for the computations.\r\n\r\n* In the current implementation the TaskSpace class is a model component, it may be a Force so it can be used as a controller during integration. But I think the latter is restrictive because, depending on the Force controller someone may be interested to have direct access to the underlying mathematics (e.g. disable gravity compensation).\r\n\r\n* In the TaskSpace.cpp method calcInverseDynamics() there is a TODO for the transformation of extra forces that may act on the model. Is there a generic way to have access to those forces and consider them in the computations.\r\n \r\n\r\n","created_at":"2015-11-18T09:27:06Z","updated_at":"2015-11-18T09:27:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/711/commits","review_comments_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/711/comments","review_comment_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/711/comments","statuses_url":"https://api.github.com/repos/opensim-org/opensim-core/statuses/ce34d907297266353215a5b07569e2aa13bcfaa8","head":{"label":"mitkof6:task_space","ref":"task_space","sha":"ce34d907297266353215a5b07569e2aa13bcfaa8","user":{"login":"mitkof6","id":4024976,"avatar_url":"https://avatars.githubusercontent.com/u/4024976?v=3","gravatar_id":"","url":"https://api.github.com/users/mitkof6","html_url":"https://github.com/mitkof6","followers_url":"https://api.github.com/users/mitkof6/followers","following_url":"https://api.github.com/users/mitkof6/following{/other_user}","gists_url":"https://api.github.com/users/mitkof6/gists{/gist_id}","starred_url":"https://api.github.com/users/mitkof6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitkof6/subscriptions","organizations_url":"https://api.github.com/users/mitkof6/orgs","repos_url":"https://api.github.com/users/mitkof6/repos","events_url":"https://api.github.com/users/mitkof6/events{/privacy}","received_events_url":"https://api.github.com/users/mitkof6/received_events","type":"User","site_admin":false},"repo":{"id":33185072,"name":"opensim-core","full_name":"mitkof6/opensim-core","owner":{"login":"mitkof6","id":4024976,"avatar_url":"https://avatars.githubusercontent.com/u/4024976?v=3","gravatar_id":"","url":"https://api.github.com/users/mitkof6","html_url":"https://github.com/mitkof6","followers_url":"https://api.github.com/users/mitkof6/followers","following_url":"https://api.github.com/users/mitkof6/following{/other_user}","gists_url":"https://api.github.com/users/mitkof6/gists{/gist_id}","starred_url":"https://api.github.com/users/mitkof6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitkof6/subscriptions","organizations_url":"https://api.github.com/users/mitkof6/orgs","repos_url":"https://api.github.com/users/mitkof6/repos","events_url":"https://api.github.com/users/mitkof6/events{/privacy}","received_events_url":"https://api.github.com/users/mitkof6/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mitkof6/opensim-core","description":"SimTK OpenSim C++ libraries and comand-line applications and Java/Python wrapping.","fork":true,"url":"https://api.github.com/repos/mitkof6/opensim-core","forks_url":"https://api.github.com/repos/mitkof6/opensim-core/forks","keys_url":"https://api.github.com/repos/mitkof6/opensim-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitkof6/opensim-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitkof6/opensim-core/teams","hooks_url":"https://api.github.com/repos/mitkof6/opensim-core/hooks","issue_events_url":"https://api.github.com/repos/mitkof6/opensim-core/issues/events{/number}","events_url":"https://api.github.com/repos/mitkof6/opensim-core/events","assignees_url":"https://api.github.com/repos/mitkof6/opensim-core/assignees{/user}","branches_url":"https://api.github.com/repos/mitkof6/opensim-core/branches{/branch}","tags_url":"https://api.github.com/repos/mitkof6/opensim-core/tags","blobs_url":"https://api.github.com/repos/mitkof6/opensim-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitkof6/opensim-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitkof6/opensim-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitkof6/opensim-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitkof6/opensim-core/statuses/{sha}","languages_url":"https://api.github.com/repos/mitkof6/opensim-core/languages","stargazers_url":"https://api.github.com/repos/mitkof6/opensim-core/stargazers","contributors_url":"https://api.github.com/repos/mitkof6/opensim-core/contributors","subscribers_url":"https://api.github.com/repos/mitkof6/opensim-core/subscribers","subscription_url":"https://api.github.com/repos/mitkof6/opensim-core/subscription","commits_url":"https://api.github.com/repos/mitkof6/opensim-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitkof6/opensim-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitkof6/opensim-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitkof6/opensim-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitkof6/opensim-core/contents/{+path}","compare_url":"https://api.github.com/repos/mitkof6/opensim-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitkof6/opensim-core/merges","archive_url":"https://api.github.com/repos/mitkof6/opensim-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitkof6/opensim-core/downloads","issues_url":"https://api.github.com/repos/mitkof6/opensim-core/issues{/number}","pulls_url":"https://api.github.com/repos/mitkof6/opensim-core/pulls{/number}","milestones_url":"https://api.github.com/repos/mitkof6/opensim-core/milestones{/number}","notifications_url":"https://api.github.com/repos/mitkof6/opensim-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitkof6/opensim-core/labels{/name}","releases_url":"https://api.github.com/repos/mitkof6/opensim-core/releases{/id}","created_at":"2015-03-31T12:49:39Z","updated_at":"2015-03-31T12:49:51Z","pushed_at":"2015-11-18T09:06:18Z","git_url":"git://github.com/mitkof6/opensim-core.git","ssh_url":"git@github.com:mitkof6/opensim-core.git","clone_url":"https://github.com/mitkof6/opensim-core.git","svn_url":"https://github.com/mitkof6/opensim-core","homepage":"opensim.stanford.edu","size":110514,"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":"master"}},"base":{"label":"opensim-org:master","ref":"master","sha":"5ee9a81097b3af1890d748f2b220f0afbd633b78","user":{"login":"opensim-org","id":4370782,"avatar_url":"https://avatars.githubusercontent.com/u/4370782?v=3","gravatar_id":"","url":"https://api.github.com/users/opensim-org","html_url":"https://github.com/opensim-org","followers_url":"https://api.github.com/users/opensim-org/followers","following_url":"https://api.github.com/users/opensim-org/following{/other_user}","gists_url":"https://api.github.com/users/opensim-org/gists{/gist_id}","starred_url":"https://api.github.com/users/opensim-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opensim-org/subscriptions","organizations_url":"https://api.github.com/users/opensim-org/orgs","repos_url":"https://api.github.com/users/opensim-org/repos","events_url":"https://api.github.com/users/opensim-org/events{/privacy}","received_events_url":"https://api.github.com/users/opensim-org/received_events","type":"Organization","site_admin":false},"repo":{"id":20775600,"name":"opensim-core","full_name":"opensim-org/opensim-core","owner":{"login":"opensim-org","id":4370782,"avatar_url":"https://avatars.githubusercontent.com/u/4370782?v=3","gravatar_id":"","url":"https://api.github.com/users/opensim-org","html_url":"https://github.com/opensim-org","followers_url":"https://api.github.com/users/opensim-org/followers","following_url":"https://api.github.com/users/opensim-org/following{/other_user}","gists_url":"https://api.github.com/users/opensim-org/gists{/gist_id}","starred_url":"https://api.github.com/users/opensim-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opensim-org/subscriptions","organizations_url":"https://api.github.com/users/opensim-org/orgs","repos_url":"https://api.github.com/users/opensim-org/repos","events_url":"https://api.github.com/users/opensim-org/events{/privacy}","received_events_url":"https://api.github.com/users/opensim-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opensim-org/opensim-core","description":"SimTK OpenSim 4.0 C++ libraries and command-line applications, and Java/Python wrapping.","fork":false,"url":"https://api.github.com/repos/opensim-org/opensim-core","forks_url":"https://api.github.com/repos/opensim-org/opensim-core/forks","keys_url":"https://api.github.com/repos/opensim-org/opensim-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opensim-org/opensim-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opensim-org/opensim-core/teams","hooks_url":"https://api.github.com/repos/opensim-org/opensim-core/hooks","issue_events_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/events{/number}","events_url":"https://api.github.com/repos/opensim-org/opensim-core/events","assignees_url":"https://api.github.com/repos/opensim-org/opensim-core/assignees{/user}","branches_url":"https://api.github.com/repos/opensim-org/opensim-core/branches{/branch}","tags_url":"https://api.github.com/repos/opensim-org/opensim-core/tags","blobs_url":"https://api.github.com/repos/opensim-org/opensim-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opensim-org/opensim-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opensim-org/opensim-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/opensim-org/opensim-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opensim-org/opensim-core/statuses/{sha}","languages_url":"https://api.github.com/repos/opensim-org/opensim-core/languages","stargazers_url":"https://api.github.com/repos/opensim-org/opensim-core/stargazers","contributors_url":"https://api.github.com/repos/opensim-org/opensim-core/contributors","subscribers_url":"https://api.github.com/repos/opensim-org/opensim-core/subscribers","subscription_url":"https://api.github.com/repos/opensim-org/opensim-core/subscription","commits_url":"https://api.github.com/repos/opensim-org/opensim-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/opensim-org/opensim-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/opensim-org/opensim-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/opensim-org/opensim-core/contents/{+path}","compare_url":"https://api.github.com/repos/opensim-org/opensim-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opensim-org/opensim-core/merges","archive_url":"https://api.github.com/repos/opensim-org/opensim-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opensim-org/opensim-core/downloads","issues_url":"https://api.github.com/repos/opensim-org/opensim-core/issues{/number}","pulls_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls{/number}","milestones_url":"https://api.github.com/repos/opensim-org/opensim-core/milestones{/number}","notifications_url":"https://api.github.com/repos/opensim-org/opensim-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opensim-org/opensim-core/labels{/name}","releases_url":"https://api.github.com/repos/opensim-org/opensim-core/releases{/id}","created_at":"2014-06-12T16:57:56Z","updated_at":"2015-11-17T10:04:51Z","pushed_at":"2015-11-18T05:35:59Z","git_url":"git://github.com/opensim-org/opensim-core.git","ssh_url":"git@github.com:opensim-org/opensim-core.git","clone_url":"https://github.com/opensim-org/opensim-core.git","svn_url":"https://github.com/opensim-org/opensim-core","homepage":"https://opensim.stanford.edu","size":112674,"stargazers_count":21,"watchers_count":21,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":243,"forks":18,"open_issues":243,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/711"},"html":{"href":"https://github.com/opensim-org/opensim-core/pull/711"},"issue":{"href":"https://api.github.com/repos/opensim-org/opensim-core/issues/711"},"comments":{"href":"https://api.github.com/repos/opensim-org/opensim-core/issues/711/comments"},"review_comments":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/711/comments"},"review_comment":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/711/commits"},"statuses":{"href":"https://api.github.com/repos/opensim-org/opensim-core/statuses/ce34d907297266353215a5b07569e2aa13bcfaa8"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":4754,"deletions":0,"changed_files":7}}