Skip to content

TransformListener does not work in composed, intra-process enabled nodes #571

Closed

Description

@roncapat

In rclcpp, nodes (actually, components) can be composed in a single process.
Moreover, with the flag use_intra_process_comms = True, components are allowed to communicate in an optimized way, relying on intra-process exchange of message references (or even better, adapted types).

TransformListener has two constructors: one that creates a new node, and one that relies on an existing one. However, if TransformListener is constructed out of a reference to a node that is an IPC-enabled component, this message appears during component initialization:

Component constructor threw an exception: intraprocess communication allowed only with volatile durability

Now, digging more in TransformListener constructor, a set of default QoS are used for TF subscription. However, I think it needs to be determined whether subscribing with "volatile durability" makes sense within TF2, and default to that if the node passed to TransformListener constructor is detected as using "use_intra_process_comms = True" flag.

Any comments/help?

Activity

  1. roncapat commented on Dec 9, 2022

    @roncapat
    ContributorAuthor

    I found a potential solution:

    Intra-process comms can be enabled/disabled per-topic. I strongly suggest to explicitly disable that in the TransformListener source code for /tf and /tf_static topic subscriptions. This will allow developers to use TransformListener with components without spawning a new Node instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions