{"action":"created","issue":{"url":"https://api.github.com/repos/humanoid-path-planner/hpp-rbprm/issues/8","repository_url":"https://api.github.com/repos/humanoid-path-planner/hpp-rbprm","labels_url":"https://api.github.com/repos/humanoid-path-planner/hpp-rbprm/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/humanoid-path-planner/hpp-rbprm/issues/8/comments","events_url":"https://api.github.com/repos/humanoid-path-planner/hpp-rbprm/issues/8/events","html_url":"https://github.com/humanoid-path-planner/hpp-rbprm/issues/8","id":391800441,"node_id":"MDU6SXNzdWUzOTE4MDA0NDE=","number":8,"title":"State.com_ may be inconsistant with State.configuration_","user":{"login":"pFernbach","id":11633215,"node_id":"MDQ6VXNlcjExNjMzMjE1","avatar_url":"https://avatars2.githubusercontent.com/u/11633215?v=4","gravatar_id":"","url":"https://api.github.com/users/pFernbach","html_url":"https://github.com/pFernbach","followers_url":"https://api.github.com/users/pFernbach/followers","following_url":"https://api.github.com/users/pFernbach/following{/other_user}","gists_url":"https://api.github.com/users/pFernbach/gists{/gist_id}","starred_url":"https://api.github.com/users/pFernbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pFernbach/subscriptions","organizations_url":"https://api.github.com/users/pFernbach/orgs","repos_url":"https://api.github.com/users/pFernbach/repos","events_url":"https://api.github.com/users/pFernbach/events{/privacy}","received_events_url":"https://api.github.com/users/pFernbach/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-12-17T16:50:45Z","updated_at":"2018-12-18T09:57:39Z","closed_at":null,"author_association":"NONE","body":"The member `com_ `of the struct `State `is not initialized in the constructor and never updated inside the `State `struct. It rely entirely on the user of the struct to correctly initialize and update this field. I think that this design is dangerous, and the struct `State` should guarantee that it's fields `configuration_ `and `com_ `are always consistant. \r\n\r\nI propose to make both field private with accessors and mutators that check if the CoM position is up to date and compute it otherwise before returning it's value. The issue is that `State `do not store a pointer to the device (required to compute the CoM position) so we need to add a `DevicePtr_t `member to `State`.\r\n\r\nDo you see a better way to do this ? Or should we just ignore this and guarantee the consistancy outside of the struct ? If so, some changes need to be made elsewhere in the code because the consistancy is not guarantee right now. "},"comment":{"url":"https://api.github.com/repos/humanoid-path-planner/hpp-rbprm/issues/comments/448163359","html_url":"https://github.com/humanoid-path-planner/hpp-rbprm/issues/8#issuecomment-448163359","issue_url":"https://api.github.com/repos/humanoid-path-planner/hpp-rbprm/issues/8","id":448163359,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODE2MzM1OQ==","user":{"login":"stonneau","id":4620966,"node_id":"MDQ6VXNlcjQ2MjA5NjY=","avatar_url":"https://avatars2.githubusercontent.com/u/4620966?v=4","gravatar_id":"","url":"https://api.github.com/users/stonneau","html_url":"https://github.com/stonneau","followers_url":"https://api.github.com/users/stonneau/followers","following_url":"https://api.github.com/users/stonneau/following{/other_user}","gists_url":"https://api.github.com/users/stonneau/gists{/gist_id}","starred_url":"https://api.github.com/users/stonneau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stonneau/subscriptions","organizations_url":"https://api.github.com/users/stonneau/orgs","repos_url":"https://api.github.com/users/stonneau/repos","events_url":"https://api.github.com/users/stonneau/events{/privacy}","received_events_url":"https://api.github.com/users/stonneau/received_events","type":"User","site_admin":false},"created_at":"2018-12-18T09:57:39Z","updated_at":"2018-12-18T09:57:39Z","author_association":"NONE","body":"let's do this then thanks!"}}
{"actor":{"display_login":"stonneau"}}