Skip to content

Support LifecycleNode and EventHandler in frontend #236

@kenji-miyake

Description

@kenji-miyake

Feature request

Feature description

It's useful to support LifecycleNode in frontend(xml) as well.

As for LifecycleNode itself, if we only use simple launch files as below, it can be done by just exposing like this kenji-miyake@8daecd8.

<launch>
  <lifecycle_node pkg="lifecycle" exec="lifecycle_talker" name="lc_talker" namespace=""/>
  <node pkg="lifecycle" exec="lifecycle_listener" />
  <node pkg="lifecycle" exec="lifecycle_service_client" />
</launch>

However, I believe it's not enough useful because we usually would like to write state transitions as well like this.

So I think it's better to support RegisterEventHandler and EventHandlers.

Implementation considerations

I think there are at least two problems.

  1. How to expose EventHandlers?
    Is it okay to add parse_event_handler and instantiate_event_handler as Action class does?

  2. How to refer Python Object from frontend?
    For example, OnStateTransition requires LifecycleNode object but I think it can't be given in frontend easily.
    Probably this is what @ivanpauno mentioned here https://answers.ros.org/question/333404/launch-composed-nodes-using-the-launch-xml-frontend/, right?

The topic of having references (i.e.: being able to identify) another action in the XML/YAML frontend is an interesting feature currently not supported. It would be useful, for example, to support event handlers.

So I guess some mechanism for finding Object from all entities.

Does anybody have any idea about this?
If somebody guides me, I'll try to work on this task!

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions