-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Launchfile for intra process communication and lifecycle nodes #880
Comments
Currently nodes can be written as components, and components can be configured and loaded in a container. You can do all that in a launch file (see for example https://github.com/ros2/demos/blob/master/composition/launch/composition_demo.launch.py). I don't remember how to set up intra-process communication when using components/containers in launch files (maybe @hidmic knows better). Currently, if you manually compose nodes in one executable (as you're currently doing), there's no nice way to configure it in a launch file. There's a proposed refactor considering that, between other things, ros2/launch#114. |
@ivanpauno Thanks for your answer. I will look more into compositions then. If we can enable intra process communication using this then it is definitely a better approach anyway. It allows to compose nodes on the fly without building an executable, which is something I also want to achieve. |
This launchfile does not give expected results, cf issue ros2/rclcpp#880 and question https://answers.ros.org/question/334549/ros2-launchfiles-how-to-launch-nodes-that-are-in-the-same-executable/
i believe that you can do what you want as followings,
if im missing something, let me know. here are my examples, (not using lifecycle node) https://github.com/fujitatomoya/demos/blob/topic-20191007-composition-intra-launch/composition/launch/composition_demo.launch.py
|
I think this issue can be closed. |
Hi, I was able to run the composition from both command line and launch file with standard nodes developed as components. But if I develop lifecycle nodes as components, I can't use composition from command line and launch file. I can compose these nodes only with a new custom node that instantiate the components from code. Did anyone try to compose lifecycle nodes from command line and/or with a launch file? |
* Get network flows of publishers and subscriptions Signed-off-by: Ananya Muddukrishna <[email protected]> * Use new unique network flow option Signed-off-by: Ananya Muddukrishna <[email protected]> * Rename file for consistency Signed-off-by: Ananya Muddukrishna <[email protected]> * Rename for clarity Signed-off-by: Ananya Muddukrishna <[email protected]> * Rename files for consistency Signed-off-by: Ananya Muddukrishna <[email protected]> * Rename and uncrustify Signed-off-by: Ananya Muddukrishna <[email protected]> * Use updated rmw interface Signed-off-by: Ananya Muddukrishna <[email protected]> * Separate validation check Signed-off-by: Ananya Muddukrishna <[email protected]> Co-authored-by: Ananya Muddukrishna <[email protected]>
Hi all,
I have created 3 nodes that use intra process communication following the available tutorial. I have created a single executable and added the 3 nodes in the executor and this works fine.
The 3 nodes I have create are lifecycle nodes, therefore if I use the
ros2 run
command I have afterwards to configure and activate each node manually. I wanted to use a launchfile to simplify this process but I can't figure out how to properly do it in this case. I have tried to launch them as normal nodes using:but this will run
modulo_core_test_cartesian
3 times resulting in 3 instances of each node conflicting with each other. I can't find of any other solution than to have to separate the nodes in different executables but then intra process communication is lost.Is what I am trying to achieve a feature that is not available yet?
Thanks in advance.
The text was updated successfully, but these errors were encountered: