Skip to content

LoadComposableNodes action blocks previous actions #107

@jacobperron

Description

@jacobperron

Bug report

In particular, it would be really convenient to be able to start a node container just before some actions to load components into it. Maybe not a bug, but certainly a big usability improvement.

Required Info:

  • Operating System:
    • Ubuntu 18.04
  • Installation type:
    • source
  • Version or commit hash:
  • DDS implementation:
    • Fast-RTPS

Steps to reproduce issue

Launch the following launch file:

from launch import LaunchDescription
from launch_ros.actions import ComposableNodeContainer
from launch_ros.actions import LoadComposableNodes
from launch_ros.descriptions import ComposableNode


def generate_launch_description():
    return LaunchDescription([
        ComposableNodeContainer(
           package='rclcpp_components', node_executable='component_container',
           node_name='my_container', node_namespace=''
        ),  
        LoadComposableNodes(
            composable_node_descriptions=[
                ComposableNode(
                    package='composition',
                    node_plugin='composition::Talker'
                )
            ],  
            target_container='my_container'
        ),  
    ])

Expected behavior

A container node starts and the composition talker component is loaded.

Actual behavior

The container does not start and so the LoadComposableNodes

Additional information

I understand that the LoadComposableNodes action is blocking until the service is available. But my intuition says that since the ComposableNodeContainer action appears first, it should be started before the loading action starts.

After talking with @wjwwood, it sounds like we should update the implementation of LoadComposableNodes so it waits for the service in a separate thread so that it doesn't block the asyncio loop.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions