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

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

Closed
roncapat opened this issue Dec 9, 2022 · 1 comment · Fixed by #572
Closed

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

roncapat opened this issue Dec 9, 2022 · 1 comment · Fixed by #572

Comments

@roncapat
Copy link
Contributor

roncapat commented Dec 9, 2022

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?

@roncapat
Copy link
Contributor Author

roncapat commented Dec 9, 2022

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
Labels
None yet
Projects
None yet
1 participant