Skip to content
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

Expose the RegisterEventHandler action #658

Open
esteve opened this issue Oct 4, 2022 · 1 comment · May be fixed by #659
Open

Expose the RegisterEventHandler action #658

esteve opened this issue Oct 4, 2022 · 1 comment · May be fixed by #659
Assignees

Comments

@esteve
Copy link
Member

esteve commented Oct 4, 2022

Feature request

Feature description

Based on the discussion in ros2/launch_ros#236 (comment), it'd be good to expose the RegisterEventHandler action so as to be able to support LifecycleNodes in launch_ros

@esteve
Copy link
Member Author

esteve commented Oct 4, 2022

@jacobperron @kenji-miyake for an example Python code like this:

        RegisterEventHandler(
            OnProcessStart(
                target_action=turtlesim_node,
                on_start=[
                    LogInfo(msg='Turtlesim started, spawning turtle'),
                    spawn_turtle
                ]
            )
        ),

I thought the XML could look like as follows:

<register_event_handler>
  <event_handler name="on_process_start">
    <target_action>turtle_sim_node<target_action/>
    <arg name="on_start">
        <action>log_info</action>
        <action>spawn_turtle</action>
    </arg>
  </event_handler>
</register_event_handler>

But I'd appreciate any feedback. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant