{"action":"created","issue":{"url":"https://api.github.com/repos/ros2/rclcpp/issues/114","repository_url":"https://api.github.com/repos/ros2/rclcpp","labels_url":"https://api.github.com/repos/ros2/rclcpp/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/ros2/rclcpp/issues/114/comments","events_url":"https://api.github.com/repos/ros2/rclcpp/issues/114/events","html_url":"https://github.com/ros2/rclcpp/issues/114","id":106856073,"number":114,"title":"Provide CMake infrastructure for creating a node","user":{"login":"wjwwood","id":100427,"avatar_url":"https://avatars1.githubusercontent.com/u/100427?v=4","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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2015-09-16T20:27:33Z","updated_at":"2018-02-26T20:14:05Z","closed_at":null,"author_association":"OWNER","body":"This is a spin off from https://github.com/ros2/ros2/issues/55.\n\nBasically we need to add some lubrication to the process of making a node which can be loaded as a library into a container or run as a stand-alone executable. This is what I imagine it would look like:\n\n``` cmake\nrclcpp_add_node(my_node src/my_node.cpp)\ntarget_link_libraries(my_node ...)\nament_target_dependencies(my_node \"rclcpp\" ...)\n...\n```\n\nThe `rclcpp_add_node` macro would create a target `my_node` which builds a shared library, and also creates a target which builds an executable (name of this target is an implementation detail) with the output name `my_node`. This allows the user to link extra libraries and what not to the library containing the node. It would also register this node in the ament index.\n\nThe output files will be `lib/libmy_node.so`, `bin/my_node`, and `share/ament_index/resource_index/nodes/pkg_name/my_node` (maybe just `share/ament_index/resource_index/nodes/pkg_name` with the `my_node` in the contents of that file).\n\nThe user's code is compiled into `lib/libmy_node.so`.\nThe executable is a boilerplate main which can load and run the shared library in stand alone mode or, with a cli switch, it can tell a remote container to load and run the library, acting as a surrogate until the node is removed from the container.\n\nThe infrastructure has been prototyped here: https://github.com/ros2/demos/pull/18\n\nMaking all of this work will require us to figure out the issues surrounding multi vendor support in https://github.com/ros2/rclcpp/issues/48\n"},"comment":{"url":"https://api.github.com/repos/ros2/rclcpp/issues/comments/368634773","html_url":"https://github.com/ros2/rclcpp/issues/114#issuecomment-368634773","issue_url":"https://api.github.com/repos/ros2/rclcpp/issues/114","id":368634773,"user":{"login":"Karsten1987","id":5419873,"avatar_url":"https://avatars0.githubusercontent.com/u/5419873?v=4","gravatar_id":"","url":"https://api.github.com/users/Karsten1987","html_url":"https://github.com/Karsten1987","followers_url":"https://api.github.com/users/Karsten1987/followers","following_url":"https://api.github.com/users/Karsten1987/following{/other_user}","gists_url":"https://api.github.com/users/Karsten1987/gists{/gist_id}","starred_url":"https://api.github.com/users/Karsten1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Karsten1987/subscriptions","organizations_url":"https://api.github.com/users/Karsten1987/orgs","repos_url":"https://api.github.com/users/Karsten1987/repos","events_url":"https://api.github.com/users/Karsten1987/events{/privacy}","received_events_url":"https://api.github.com/users/Karsten1987/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T20:14:04Z","updated_at":"2018-02-26T20:14:04Z","author_association":"CONTRIBUTOR","body":"@wjwwood same as https://github.com/ros2/rclcpp/issues/115#issuecomment-368631239"}}
{"actor":{"display_login":"Karsten1987"}}