You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide CMake infrastructure for creating a node #114
Basically 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:
The 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.
The 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).
The user's code is compiled into lib/libmy_node.so.
The 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.
The infrastructure has been prototyped here: ros2/demos#18
Making all of this work will require us to figure out the issues surrounding multi vendor support in #48
Activity
Karsten1987 commentedon Feb 26, 2018
@wjwwood same as #115 (comment)
wjwwood commentedon Feb 26, 2018
I would say no. We still do not have CMake infrastructure to let users easily create node components. And I still think we should.
jacobperron commentedon Jun 7, 2019
I've proposed this for a Dashing patch release since it enables ros2/demos#325.
wjwwood commentedon Mar 19, 2020
Closed by #784?
Merge pull request ros2#114 from ros2/revert-93-honor-build-shared-libs
Handle message type name with multiple namespace parts (ros2#114)
Merge pull request ros2#114 from irobot-ros/asoragna/defer-callback