{"action":"created","issue":{"url":"https://api.github.com/repos/jsk-ros-pkg/jsk_roseus/issues/378","labels_url":"https://api.github.com/repos/jsk-ros-pkg/jsk_roseus/issues/378/labels{/name}","comments_url":"https://api.github.com/repos/jsk-ros-pkg/jsk_roseus/issues/378/comments","events_url":"https://api.github.com/repos/jsk-ros-pkg/jsk_roseus/issues/378/events","html_url":"https://github.com/jsk-ros-pkg/jsk_roseus/pull/378","id":112012478,"number":378,"title":"[roseus] Add topic-listener helper class to write ros program in procedual manner","user":{"login":"garaemon","id":40454,"avatar_url":"https://avatars.githubusercontent.com/u/40454?v=3","gravatar_id":"","url":"https://api.github.com/users/garaemon","html_url":"https://github.com/garaemon","followers_url":"https://api.github.com/users/garaemon/followers","following_url":"https://api.github.com/users/garaemon/following{/other_user}","gists_url":"https://api.github.com/users/garaemon/gists{/gist_id}","starred_url":"https://api.github.com/users/garaemon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garaemon/subscriptions","organizations_url":"https://api.github.com/users/garaemon/orgs","repos_url":"https://api.github.com/users/garaemon/repos","events_url":"https://api.github.com/users/garaemon/events{/privacy}","received_events_url":"https://api.github.com/users/garaemon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-10-18T10:31:37Z","updated_at":"2015-10-19T01:07:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jsk-ros-pkg/jsk_roseus/pulls/378","html_url":"https://github.com/jsk-ros-pkg/jsk_roseus/pull/378","diff_url":"https://github.com/jsk-ros-pkg/jsk_roseus/pull/378.diff","patch_url":"https://github.com/jsk-ros-pkg/jsk_roseus/pull/378.patch"},"body":"I think a lot code has these structure.\r\n```lisp\r\n(defun hoge-topic-callback (msg)\r\n   (setq *hoge* msg))\r\n\r\n(ros::subscribe \"hoge\" foo_msgs::Foo #'hoge-topic-callback)\r\n(ros::spin-once)\r\n(send *hoge* :hoge)\r\n...\r\n```\r\n\r\n\r\n`topic-listener` class can help these program.\r\n```lisp\r\n(setq *hoge* (instance topic-listener :init \"hoge\" foo_msgs::Foo)\r\n(ros::spin-once)\r\n(send (send *hoge* :value) :hoge)\r\n...\r\n```\r\n\r\nIn fact, programmer should not write program which requires this `topic-listener` class but it's a kind of unavoidable hack."},"comment":{"url":"https://api.github.com/repos/jsk-ros-pkg/jsk_roseus/issues/comments/149071938","html_url":"https://github.com/jsk-ros-pkg/jsk_roseus/pull/378#issuecomment-149071938","issue_url":"https://api.github.com/repos/jsk-ros-pkg/jsk_roseus/issues/378","id":149071938,"user":{"login":"k-okada","id":493276,"avatar_url":"https://avatars.githubusercontent.com/u/493276?v=3","gravatar_id":"","url":"https://api.github.com/users/k-okada","html_url":"https://github.com/k-okada","followers_url":"https://api.github.com/users/k-okada/followers","following_url":"https://api.github.com/users/k-okada/following{/other_user}","gists_url":"https://api.github.com/users/k-okada/gists{/gist_id}","starred_url":"https://api.github.com/users/k-okada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k-okada/subscriptions","organizations_url":"https://api.github.com/users/k-okada/orgs","repos_url":"https://api.github.com/users/k-okada/repos","events_url":"https://api.github.com/users/k-okada/events{/privacy}","received_events_url":"https://api.github.com/users/k-okada/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T01:07:15Z","updated_at":"2015-10-19T01:07:15Z","body":"...\ncurrently (with topic-listener)\n\n(setq image_publisher/output (instance topic-listener :init\n\"image_publisher/output\" sensor_msgs::Image))\n(send image_publisher/output :msg)\n(setq now (ros::time-now))\n(while (< (send msg :header :stamp :sec) (send now :sec)) (unix::sleep 1)\n(ros::spin-once))\n(ros::unsubscribe \"image_publisher/output\")\n...\n(setq image_publisher/output (instance topic-listener :init\n\"image_publisher/output\" sensor_msgs::Image))\n...\n\nyou can use actionlib\n\n--\n◉ Kei Okada\n\n\nOn Mon, Oct 19, 2015 at 10:01 AM, Kei Okada <k-okada@jsk.t.u-tokyo.ac.jp>\nwrote:\n\n> Most of 'useful' features were not used after a few months , please keep\n> this pr open and see if you still need this after a few weeks.\n>\n>\n> https://github.com/jsk-ros-pkg/jsk_roseus/issues/237\n>\n>\n> https://github.com/jsk-ros-pkg/jsk_roseus/commit/ae21ae204530f03e801dd43f4bea8307823420ff\n>\n> > This procedure may have overhead.\n>\n> Does this mean we should not use one-shot-subscriber and move to using new\n> class?\n>\n> 2015年10月19日月曜日、Ryohei Ueda<notifications@github.com>さんは書きました:\n>\n>> I see, @wkentaro <https://github.com/wkentaro> mean subscriber class may\n>> help coder like rospy and roscpp. I agree with it.\n>>\n>> —\n>> Reply to this email directly or view it on GitHub\n>> <https://github.com/jsk-ros-pkg/jsk_roseus/pull/378#issuecomment-149024740>\n>> .\n>>\n>\n>\n> --\n> --\n> ◉ Kei Okada\n>\n>\n>\n"}}