{"action":"created","issue":{"url":"https://api.github.com/repos/dartsim/dart/issues/437","labels_url":"https://api.github.com/repos/dartsim/dart/issues/437/labels{/name}","comments_url":"https://api.github.com/repos/dartsim/dart/issues/437/comments","events_url":"https://api.github.com/repos/dartsim/dart/issues/437/events","html_url":"https://github.com/dartsim/dart/issues/437","id":93591094,"number":437,"title":"Chain::create has unintuitive behavior","user":{"login":"mkoval","id":142251,"avatar_url":"https://avatars.githubusercontent.com/u/142251?v=3","gravatar_id":"","url":"https://api.github.com/users/mkoval","html_url":"https://github.com/mkoval","followers_url":"https://api.github.com/users/mkoval/followers","following_url":"https://api.github.com/users/mkoval/following{/other_user}","gists_url":"https://api.github.com/users/mkoval/gists{/gist_id}","starred_url":"https://api.github.com/users/mkoval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkoval/subscriptions","organizations_url":"https://api.github.com/users/mkoval/orgs","repos_url":"https://api.github.com/users/mkoval/repos","events_url":"https://api.github.com/users/mkoval/events{/privacy}","received_events_url":"https://api.github.com/users/mkoval/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-07T18:01:06Z","updated_at":"2015-07-08T04:11:19Z","closed_at":null,"body":"The `Chain::create` function surprisingly includes the parent joint of `_start` in the chain. This is incorrect because the parent joint of `_start` is not a member of the chain from `_start` to `_end`.\r\n\r\nThis also conflicts with the convention in other software packages. Here's an excerpt from the [SRDF documentation](http://wiki.ros.org/srdf):\r\n> Note: Based on the links in the chain, the set of joints in the chain is implicitly defined. The joints that correspond to a chain are the parent joints for the links in the chain, except the parent joint of the base_link.\r\n\r\nAnd the [OpenRAVE documentation](http://openrave.org/docs/latest_stable/coreapihtml/classOpenRAVE_1_1KinBody.html#a460589ce07ac6b2c84f0c0f921a5f8ab):\r\n> Returns true if the dof index affects the relative transformation between the two links."},"comment":{"url":"https://api.github.com/repos/dartsim/dart/issues/comments/119420836","html_url":"https://github.com/dartsim/dart/issues/437#issuecomment-119420836","issue_url":"https://api.github.com/repos/dartsim/dart/issues/437","id":119420836,"user":{"login":"mxgrey","id":1307217,"avatar_url":"https://avatars.githubusercontent.com/u/1307217?v=3","gravatar_id":"","url":"https://api.github.com/users/mxgrey","html_url":"https://github.com/mxgrey","followers_url":"https://api.github.com/users/mxgrey/followers","following_url":"https://api.github.com/users/mxgrey/following{/other_user}","gists_url":"https://api.github.com/users/mxgrey/gists{/gist_id}","starred_url":"https://api.github.com/users/mxgrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxgrey/subscriptions","organizations_url":"https://api.github.com/users/mxgrey/orgs","repos_url":"https://api.github.com/users/mxgrey/repos","events_url":"https://api.github.com/users/mxgrey/events{/privacy}","received_events_url":"https://api.github.com/users/mxgrey/received_events","type":"User","site_admin":false},"created_at":"2015-07-08T04:11:19Z","updated_at":"2015-07-08T04:11:19Z","body":"The way the indexing works, a Joint gets included in a ReferentialSkeleton by having its child BodyNode included. When you call ``getJoint(0)`` you're really saying ``getBodyNode(0)->getParentJoint()``. This mostly has to do with the fact that the value of a Joint's pointer is liable to change at any moment, so we really need to store the BodyNode and get to the parent Joint via its child BodyNode.\r\n\r\nSo under the current scheme, there is a 1-to-1 correspondence between the Joints in a ReferentialSkeleton and the BodyNodes in that ReferentialSkeleton. There's a tiny bit more flexibility for DegreesOfFreedom (you can have a BodyNode in a ReferentialSkeleton without having all of its DegreesOfFreedom), but you only really get to take advantage of that flexibility if you use the Group class instead of the Linkage class.\r\n\r\nIt may be possible to rework the scheme, but I feel like that might add unnecessary complexity."}}