{"action":"created","issue":{"url":"https://api.github.com/repos/ros2/demos/issues/12","labels_url":"https://api.github.com/repos/ros2/demos/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/ros2/demos/issues/12/comments","events_url":"https://api.github.com/repos/ros2/demos/issues/12/events","html_url":"https://github.com/ros2/demos/pull/12","id":103083483,"number":12,"title":"Intra-process image pipeline example","user":{"login":"jacquelinekay","id":495933,"avatar_url":"https://avatars.githubusercontent.com/u/495933?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquelinekay","html_url":"https://github.com/jacquelinekay","followers_url":"https://api.github.com/users/jacquelinekay/followers","following_url":"https://api.github.com/users/jacquelinekay/following{/other_user}","gists_url":"https://api.github.com/users/jacquelinekay/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquelinekay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquelinekay/subscriptions","organizations_url":"https://api.github.com/users/jacquelinekay/orgs","repos_url":"https://api.github.com/users/jacquelinekay/repos","events_url":"https://api.github.com/users/jacquelinekay/events{/privacy}","received_events_url":"https://api.github.com/users/jacquelinekay/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ros2/demos/labels/in%20review","name":"in review","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"wjwwood","id":100427,"avatar_url":"https://avatars.githubusercontent.com/u/100427?v=3","gravatar_id":"","url":"https://api.github.com/users/wjwwood","html_url":"https://github.com/wjwwood","followers_url":"https://api.github.com/users/wjwwood/followers","following_url":"https://api.github.com/users/wjwwood/following{/other_user}","gists_url":"https://api.github.com/users/wjwwood/gists{/gist_id}","starred_url":"https://api.github.com/users/wjwwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjwwood/subscriptions","organizations_url":"https://api.github.com/users/wjwwood/orgs","repos_url":"https://api.github.com/users/wjwwood/repos","events_url":"https://api.github.com/users/wjwwood/events{/privacy}","received_events_url":"https://api.github.com/users/wjwwood/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-08-25T18:04:35Z","updated_at":"2015-08-28T04:36:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ros2/demos/pulls/12","html_url":"https://github.com/ros2/demos/pull/12","diff_url":"https://github.com/ros2/demos/pull/12.diff","patch_url":"https://github.com/ros2/demos/pull/12.patch"},"body":"This is a first pass at an example that exercises intra-process communication for an image processing pipeline.\r\n\r\nAdds:\r\n* img_pipeline.cpp, a simple main class which loads the nodes into one SingleThreadedExecutor and spins.\r\n* utils.hpp, contains Mat <-> ROS Image.msg conversion functions.\r\n* 4 subclasses of Node which execute intra-process comms by default:\r\n  * DeviceNode, which publishes a video stream to a rostopic.\r\n  * ExtractorNode, which performs a read-only operation on the image it receives (histogram calculation) and republishes the message on a new topic.\r\n  * ModifierNode, which writes to the image (color inversion) and publishes the modified message on a new topic.\r\n  * VisualizerNode, which shows the modified image in an OpenCV window.\r\n\r\nTodo:\r\n- [ ] Terminal output that shows that intra-process communication is being exercised (e.g. print out pointer values for messages).\r\n- [ ] Write more main examples exercising different process compositions, or integrate with class_loader.\r\n- [ ] Copy performance issue: currently, `convert_message_to_frame` performs a zero-copy conversion from ROS message to OpenCV Mat \"frame\" by assigning to Mat data pointer to the start of the ROS Image data vector. However, `convert_frame_to_message` copies the Mat data into the ROS Image data vector, because I couldn't figure out how to directly assign the pointer to the underlying data of a vector (and I don't think this is possible).\r\n- [ ] Framerate is fairly low right now; publishing at higher than ~33Hz causes a race condition similar to ros2/ros2/issues/91 where the publishers for the other nodes do not get initialized before the executor starts spinning."},"comment":{"url":"https://api.github.com/repos/ros2/demos/issues/comments/135630474","html_url":"https://github.com/ros2/demos/pull/12#issuecomment-135630474","issue_url":"https://api.github.com/repos/ros2/demos/issues/12","id":135630474,"user":{"login":"wjwwood","id":100427,"avatar_url":"https://avatars.githubusercontent.com/u/100427?v=3","gravatar_id":"","url":"https://api.github.com/users/wjwwood","html_url":"https://github.com/wjwwood","followers_url":"https://api.github.com/users/wjwwood/followers","following_url":"https://api.github.com/users/wjwwood/following{/other_user}","gists_url":"https://api.github.com/users/wjwwood/gists{/gist_id}","starred_url":"https://api.github.com/users/wjwwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjwwood/subscriptions","organizations_url":"https://api.github.com/users/wjwwood/orgs","repos_url":"https://api.github.com/users/wjwwood/repos","events_url":"https://api.github.com/users/wjwwood/events{/privacy}","received_events_url":"https://api.github.com/users/wjwwood/received_events","type":"User","site_admin":false},"created_at":"2015-08-28T04:36:13Z","updated_at":"2015-08-28T04:36:13Z","body":"Work around is in place and it compiles on Windows, new CI:\n\n- http://ci.ros2.org/job/ros2_batch_ci_linux/283/\n- http://ci.ros2.org/job/ros2_batch_ci_osx/208/\n- http://ci.ros2.org/job/ros2_batch_ci_windows/283/"}}