-
Notifications
You must be signed in to change notification settings - Fork 74
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
Make OnStateTransition work with the new ComposableNode descriptions #41
Comments
Has there been any movement on this? |
Temporary workaround for ros2/launch_ros#41
This issue seems to be linked to this ongoing refactoring : ros2/design#272 (comment) |
I have an experimental, heavily refactored prototype for the launch_ros composition part in https://github.com/ipa-cmh/launch_ros_experimental that does enable this.
It breaks the existing API, so this probably not mergeable, just wanted to point out it exists. You can use it like this: import launch
from launch_ros_experimental.actions import ComposableNode, ComposableNodeContainer, ComposableLifecycleNode
from launch_ros.actions import LifecycleTransition
from lifecycle_msgs.msg import Transition
def generate_launch_description():
"""Generate launch description with multiple components."""
container = ComposableNodeContainer(
name='my_container',
namespace='',
package='rclcpp_components',
executable='component_container',
output='screen',
)
node = ComposableNode(
package='composition',
component='composition::Talker',
name='talker',
target_container='my_container'
)
lifecycle_node = ComposableLifecycleNode(
package='composition',
component='composition::LifecycleTalker',
name='lctalker',
namespace='',
target_container='my_container'
)
lifecycle_node_1 = ComposableLifecycleNode(
package='composition',
component='composition::LifecycleTalker',
name='lctalker_1',
namespace='',
target_container='my_container'
)
lifecycle_transition = LifecycleTransition(
lifecycle_node_names=['lctalker', 'lctalker_1'],
transitions_ids=[
Transition.TRANSITION_CONFIGURE,
Transition.TRANSITION_ACTIVATE]
)
return launch.LaunchDescription([container, node, lifecycle_node, lifecycle_node_1, lifecycle_transition]) For testing you can use https://github.com/ipa-cmh/demos/tree/lifecycle_components which has the composition LifecycleTalker component. |
ros2/launch#672 is related. I wonder if I should create all issues in this repo, rather than https://github.com/ros2/launch repo? |
@ipa-cmh thanks for your repo! I've tryied your repo in my project. It seems that your repo doesnot support Foxy version am I right? Which versions do you plan to support? Thanks. |
Also, |
Any news on this development? It's been 5 years already and we still can't properly use the launch Event system to manage the lifecycle of composable nodes. |
Feature request
Feature description
In Dashing, the ComposableNodeContainer action and the corresponding ComposableNode description were introduced. A ComposableNode description also takes a managed node (aka lifecycle node). However, configuring and activating a lifecycle node by a ComposableNode description (instead of a LifecycleNode action) fails:
Using a matcher is also not possible but gives an exception.
When calling matches_action with a ComposableNode description is simply does nothing:
Probably, the whole matching and event system for lifecycle action and events has to be extended for ComposbleNode descriptions.
As a starting for experiments, you may use the damped_pendulum_with_transport_delay_as_composed_node.launch.py of the fmi_adapter_examples package, cf. https://github.com/boschresearch/fmi_adapter_ros2/blob/0.1.5/fmi_adapter_examples/launch/damped_pendulum_with_transport_delay_as_composed_node.launch.py and remove comments in lines 90 to 103 and 106 to 108.
The text was updated successfully, but these errors were encountered: