{"action":"created","issue":{"url":"https://api.github.com/repos/robotology/gazebo-yarp-plugins/issues/192","labels_url":"https://api.github.com/repos/robotology/gazebo-yarp-plugins/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/robotology/gazebo-yarp-plugins/issues/192/comments","events_url":"https://api.github.com/repos/robotology/gazebo-yarp-plugins/issues/192/events","html_url":"https://github.com/robotology/gazebo-yarp-plugins/issues/192","id":75959227,"number":192,"title":"SEA joints simulation using gazebo-yarp-plugins ","user":{"login":"traversaro","id":1857049,"avatar_url":"https://avatars.githubusercontent.com/u/1857049?v=3","gravatar_id":"","url":"https://api.github.com/users/traversaro","html_url":"https://github.com/traversaro","followers_url":"https://api.github.com/users/traversaro/followers","following_url":"https://api.github.com/users/traversaro/following{/other_user}","gists_url":"https://api.github.com/users/traversaro/gists{/gist_id}","starred_url":"https://api.github.com/users/traversaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/traversaro/subscriptions","organizations_url":"https://api.github.com/users/traversaro/orgs","repos_url":"https://api.github.com/users/traversaro/repos","events_url":"https://api.github.com/users/traversaro/events{/privacy}","received_events_url":"https://api.github.com/users/traversaro/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/robotology/gazebo-yarp-plugins/labels/Component:%20ControlBoard","name":"Component: ControlBoard","color":"d4c5f9"},{"url":"https://api.github.com/repos/robotology/gazebo-yarp-plugins/labels/Type:%20Enhancement","name":"Type: Enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/robotology/gazebo-yarp-plugins/labels/Volunteer%20needed","name":"Volunteer needed","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-05-13T11:55:32Z","updated_at":"2015-07-02T15:10:42Z","closed_at":null,"body":"Currently yarp motor interfaces are used in robot equipped with SEA (Series Elastic Joints) to get \"motor\" encoder readings using the [`iMotorEncoders`](http://wiki.icub.org/yarpdoc/classyarp_1_1dev_1_1IMotorEncoders.html) interface, as opposed to the [`IEncoders`](http://wiki.icub.org/yarpdoc/classyarp_1_1dev_1_1IEncoders.html) interface that is usually post-transmission encoder readings. \r\n\r\nApparently series elastic joints can be simulated in Gazebo (but this should be verified!) using a couple of joints, one active and one passive, as described in https://bitbucket.org/osrf/gazebo/pull-request/735/create-spring-damper-in-joints-issue-845/diff#comment-671487. \r\n\r\nThe relative sdf should be something like (with `parent_link`, `rotor` and `child_link` with proper inertia values):\r\n ~~~xml\r\n<model name=\"se_test_model\">\r\n  <link name=\"parent_link\"/>\r\n  <link name=\"rotor\"/>\r\n  <link name=\"child_link\"/>\r\n  <joint name=\"motor_joint\" type=\"revolute\">\r\n    <parent>parent_link</parent>\r\n    <child>rotor</child>\r\n  </joint>\r\n  <joint name=\"elastic_joint\" type=\"revolute\">\r\n    <parent>rotor</parent>\r\n    <child>child_link</child>\r\n    <axis>\r\n      <stiffness>[series elastic element stiffness]</stiffness>\r\n    </axis>\r\n  </joint>\r\n</model>\r\n~~~\r\n\r\n If this configuration works and actually properly simulates a SEA, we should then modify the `gazebo_yarp_controlboard` to support this configuration and modify the behaviour of various functions, for example:\r\n* `IMotorEncoders::getMotorEncoder` should return the position of joint `motor_joint`. \r\n* `IEncoders::getEncoder` should return the sum of position of the joint `motor_joint` and `elastic_joint` (because the `elastic_joint` position is actually the spring deflection). \r\n\r\nProbably also other method should be modified. "},"comment":{"url":"https://api.github.com/repos/robotology/gazebo-yarp-plugins/issues/comments/118063548","html_url":"https://github.com/robotology/gazebo-yarp-plugins/issues/192#issuecomment-118063548","issue_url":"https://api.github.com/repos/robotology/gazebo-yarp-plugins/issues/192","id":118063548,"user":{"login":"traversaro","id":1857049,"avatar_url":"https://avatars.githubusercontent.com/u/1857049?v=3","gravatar_id":"","url":"https://api.github.com/users/traversaro","html_url":"https://github.com/traversaro","followers_url":"https://api.github.com/users/traversaro/followers","following_url":"https://api.github.com/users/traversaro/following{/other_user}","gists_url":"https://api.github.com/users/traversaro/gists{/gist_id}","starred_url":"https://api.github.com/users/traversaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/traversaro/subscriptions","organizations_url":"https://api.github.com/users/traversaro/orgs","repos_url":"https://api.github.com/users/traversaro/repos","events_url":"https://api.github.com/users/traversaro/events{/privacy}","received_events_url":"https://api.github.com/users/traversaro/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T15:10:42Z","updated_at":"2015-07-02T15:10:42Z","body":"@hu-yue just so the branch ( link for other readers : https://github.com/robotology/gazebo-yarp-plugins/compare/master...hu-yue:sea_joints?expand=1 ). \r\n\r\nYes I think it should work, we can tick `Modify behaviour of iMotorEncoders and the IEncoders interfaces` ! \r\n@barbalberto one thing : we are not sure how IEncoders is implemented in the Coman, do you know what measure is returning? "}}