{"action":"created","issue":{"url":"https://api.github.com/repos/robotology/yarp/issues/1826","repository_url":"https://api.github.com/repos/robotology/yarp","labels_url":"https://api.github.com/repos/robotology/yarp/issues/1826/labels{/name}","comments_url":"https://api.github.com/repos/robotology/yarp/issues/1826/comments","events_url":"https://api.github.com/repos/robotology/yarp/issues/1826/events","html_url":"https://github.com/robotology/yarp/issues/1826","id":347951162,"node_id":"MDU6SXNzdWUzNDc5NTExNjI=","number":1826,"title":"yarp bindings give error with Vector conversion","user":{"login":"towardthesea","id":4939985,"node_id":"MDQ6VXNlcjQ5Mzk5ODU=","avatar_url":"https://avatars3.githubusercontent.com/u/4939985?v=4","gravatar_id":"","url":"https://api.github.com/users/towardthesea","html_url":"https://github.com/towardthesea","followers_url":"https://api.github.com/users/towardthesea/followers","following_url":"https://api.github.com/users/towardthesea/following{/other_user}","gists_url":"https://api.github.com/users/towardthesea/gists{/gist_id}","starred_url":"https://api.github.com/users/towardthesea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/towardthesea/subscriptions","organizations_url":"https://api.github.com/users/towardthesea/orgs","repos_url":"https://api.github.com/users/towardthesea/repos","events_url":"https://api.github.com/users/towardthesea/events{/privacy}","received_events_url":"https://api.github.com/users/towardthesea/received_events","type":"User","site_admin":false},"labels":[{"id":1010260995,"node_id":"MDU6TGFiZWwxMDEwMjYwOTk1","url":"https://api.github.com/repos/robotology/yarp/labels/Affects:%20YARP%20v3.1.0","name":"Affects: YARP v3.1.0","color":"006b75","default":false},{"id":62185730,"node_id":"MDU6TGFiZWw2MjE4NTczMA==","url":"https://api.github.com/repos/robotology/yarp/labels/Component:%20Bindings","name":"Component: Bindings","color":"bfdadc","default":false},{"id":1030772220,"node_id":"MDU6TGFiZWwxMDMwNzcyMjIw","url":"https://api.github.com/repos/robotology/yarp/labels/Fixed%20in:%20YARP%20v3.1.1","name":"Fixed in: YARP v3.1.1","color":"fbca04","default":false},{"id":36381544,"node_id":"MDU6TGFiZWwzNjM4MTU0NA==","url":"https://api.github.com/repos/robotology/yarp/labels/Issue%20Type:%20Bug","name":"Issue Type: Bug","color":"9830d1","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-08-06T14:37:23Z","updated_at":"2018-08-29T12:33:30Z","closed_at":"2018-08-21T11:42:40Z","author_association":"NONE","body":"**Describe the bug**\r\nI used to do following in `Python` with `yarp bindings` to convert a `Swig object of Vector` to `Vector` in `yarp 2.x`, for example when using `iKin` to get the current joint angles of the `iCubArm`\r\n```\r\n        angle = self._iArm.getAng()  #_iArm = icub.iCubArm('right')\r\n        print('angle', angle)\r\n        angle_vector = yarp.Vector(angle)  # my result yarp Vector of joint angles\r\n```\r\nHowever, I got following error when doing the same with `yarp 3.x`\r\n\r\n```\r\n('angle', <Swig Object of type 'yarp::sig::Vector *' at 0x7f82a0098240>)\r\nTraceback (most recent call last):\r\n  File \"demo/yarp_demo.py\", line 550, in <module>\r\n    arm_estimation.runModule(rf)\r\n...\r\n    return _yarp.RFModule_runModule(self, *args)\r\n  File \"demo/yarp_demo.py\", line 264, in updateModule\r\n    self.predict_yarp\r\n  File \"demo/yarp_demo.py\", line 443, in predict_yarp\r\n    angle_vector = yarp.Vector(angle)\r\n  File \"/home/pnguyen/icub-workspace/yarp/build/lib/python/yarp.py\", line 13830, in __init__\r\n    this = _yarp.new_Vector(*args)\r\nNotImplementedError: Wrong number or type of arguments for overloaded function 'new_Vector'.\r\n  Possible C/C++ prototypes are:\r\n    yarp::sig::VectorOf< double >::VectorOf()\r\n    yarp::sig::VectorOf< double >::VectorOf(size_t)\r\n    yarp::sig::VectorOf< double >::VectorOf(size_t,double const &)\r\n    yarp::sig::VectorOf< double >::VectorOf(size_t,double const *)\r\n    yarp::sig::VectorOf< double >::VectorOf(yarp::sig::VectorOf< double > const &)\r\n\r\nswig/python detected a memory leak of type 'yarp::sig::Vector *', no destructor found.\r\n```\r\nand the application failed.\r\n\r\n**Configuration (please complete the following information):**\r\n - OS: ubuntu 16.04\r\n - yarp version: >3.1 (devel)\r\n-  compiler:\r\n\r\nProbably some changes with the definition of `Vector` in `yarp 3.x` causes some mismatches after conversion of `swig`."},"comment":{"url":"https://api.github.com/repos/robotology/yarp/issues/comments/416935894","html_url":"https://github.com/robotology/yarp/issues/1826#issuecomment-416935894","issue_url":"https://api.github.com/repos/robotology/yarp/issues/1826","id":416935894,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjkzNTg5NA==","user":{"login":"Nicogene","id":19152494,"node_id":"MDQ6VXNlcjE5MTUyNDk0","avatar_url":"https://avatars1.githubusercontent.com/u/19152494?v=4","gravatar_id":"","url":"https://api.github.com/users/Nicogene","html_url":"https://github.com/Nicogene","followers_url":"https://api.github.com/users/Nicogene/followers","following_url":"https://api.github.com/users/Nicogene/following{/other_user}","gists_url":"https://api.github.com/users/Nicogene/gists{/gist_id}","starred_url":"https://api.github.com/users/Nicogene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nicogene/subscriptions","organizations_url":"https://api.github.com/users/Nicogene/orgs","repos_url":"https://api.github.com/users/Nicogene/repos","events_url":"https://api.github.com/users/Nicogene/events{/privacy}","received_events_url":"https://api.github.com/users/Nicogene/received_events","type":"User","site_admin":false},"created_at":"2018-08-29T12:33:30Z","updated_at":"2018-08-29T12:33:30Z","author_association":"CONTRIBUTOR","body":"Ah I see! The problem wasn't the copy constructor but this line:\r\n\r\n```python\r\nprint('angle',angle)\r\n```\r\nwhere `angle` is a yarp::sig::Vector."}}
{"actor":{"display_login":"Nicogene"}}