{"action":"created","issue":{"url":"https://api.github.com/repos/ros2/rclpy/issues/242","repository_url":"https://api.github.com/repos/ros2/rclpy","labels_url":"https://api.github.com/repos/ros2/rclpy/issues/242/labels{/name}","comments_url":"https://api.github.com/repos/ros2/rclpy/issues/242/comments","events_url":"https://api.github.com/repos/ros2/rclpy/issues/242/events","html_url":"https://github.com/ros2/rclpy/pull/242","id":367919103,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMjE2OTc5","number":242,"title":"rclpy raw subscriptions","user":{"login":"josephduchesne","id":2277843,"node_id":"MDQ6VXNlcjIyNzc4NDM=","avatar_url":"https://avatars2.githubusercontent.com/u/2277843?v=4","gravatar_id":"","url":"https://api.github.com/users/josephduchesne","html_url":"https://github.com/josephduchesne","followers_url":"https://api.github.com/users/josephduchesne/followers","following_url":"https://api.github.com/users/josephduchesne/following{/other_user}","gists_url":"https://api.github.com/users/josephduchesne/gists{/gist_id}","starred_url":"https://api.github.com/users/josephduchesne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephduchesne/subscriptions","organizations_url":"https://api.github.com/users/josephduchesne/orgs","repos_url":"https://api.github.com/users/josephduchesne/repos","events_url":"https://api.github.com/users/josephduchesne/events{/privacy}","received_events_url":"https://api.github.com/users/josephduchesne/received_events","type":"User","site_admin":false},"labels":[{"id":324944590,"node_id":"MDU6TGFiZWwzMjQ5NDQ1OTA=","url":"https://api.github.com/repos/ros2/rclpy/labels/in%20review","name":"in review","color":"388be2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-10-08T19:16:35Z","updated_at":"2018-12-29T05:00:14Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/ros2/rclpy/pulls/242","html_url":"https://github.com/ros2/rclpy/pull/242","diff_url":"https://github.com/ros2/rclpy/pull/242.diff","patch_url":"https://github.com/ros2/rclpy/pull/242.patch"},"body":"Note: This implementation is incomplete and at the moment this PR exists primarily for getting feedback.\r\nThis is being done so that [ros2cli#132](https://github.com/ros2/ros2cli/issues/132) can implement \"ros2 topic bw\".\r\n\r\n- [x] Initial prototype \r\n- [x] Correct memory allocation implementation\r\n- [x] Add tests\r\n- [x] Add example to demos/demo_nodes_py\r\n\r\nThe general idea is to allow creating a raw subscription like so:\r\n```\r\nclass ListenerRaw(Node):\r\n\r\n    def __init__(self):\r\n        super().__init__('listener')\r\n        self.sub = self.create_subscription(String, 'chatter', self.chatter_callback, raw=True)\r\n\r\n    def chatter_callback(self, msg):\r\n        self.get_logger().info('I heard: [%s]' % msg)\r\n```\r\nThis will call rcl_take_serialized_message rather than rcl_take internally, and return a python byte array representing the serialised message.\r\n\r\n> [INFO] [listener]: I heard: [b'\\x00\\x01\\x00\\x00\\x05\\x00\\x00\\x00Test\\x00\\x00\\x00\\x00']\r\n(For the message \"Test\")."},"comment":{"url":"https://api.github.com/repos/ros2/rclpy/issues/comments/450465949","html_url":"https://github.com/ros2/rclpy/pull/242#issuecomment-450465949","issue_url":"https://api.github.com/repos/ros2/rclpy/issues/242","id":450465949,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDQ2NTk0OQ==","user":{"login":"josephduchesne","id":2277843,"node_id":"MDQ6VXNlcjIyNzc4NDM=","avatar_url":"https://avatars2.githubusercontent.com/u/2277843?v=4","gravatar_id":"","url":"https://api.github.com/users/josephduchesne","html_url":"https://github.com/josephduchesne","followers_url":"https://api.github.com/users/josephduchesne/followers","following_url":"https://api.github.com/users/josephduchesne/following{/other_user}","gists_url":"https://api.github.com/users/josephduchesne/gists{/gist_id}","starred_url":"https://api.github.com/users/josephduchesne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephduchesne/subscriptions","organizations_url":"https://api.github.com/users/josephduchesne/orgs","repos_url":"https://api.github.com/users/josephduchesne/repos","events_url":"https://api.github.com/users/josephduchesne/events{/privacy}","received_events_url":"https://api.github.com/users/josephduchesne/received_events","type":"User","site_admin":false},"created_at":"2018-12-29T05:00:14Z","updated_at":"2018-12-29T05:00:14Z","author_association":"NONE","body":"Latest master branch merged in, compiled and tested in a clean source install of ros2 crystal (with the minor fixes performed). Also updated the sister request in ros2/demos#287 in the same way although it worked without changes after merging."}}
{"actor":{"display_login":"josephduchesne"}}