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

[ROS2] compressed_subscriber may create an unintelligible parameter for mode_param_name #81

Open
jfinken opened this issue Aug 3, 2021 · 1 comment
Labels

Comments

@jfinken
Copy link

jfinken commented Aug 3, 2021

What happens if the namespace of a subscriber node (node->get_effective_namespace()) has nothing to do with the base_topic to which it is subscribing?

More specifically, if the namespace from base_topic does not equal node->get_effective_namespace() then mode_param_name may be unintelligible.

Example:

base_topic: /ab_sync_out_ns/camera/sync/image
node->get_effective_namespace(): /efgh_viz_ns/
ns_len: 13
base_topic.substr(ns_len): ns/camera/sync/image
mode_param_name: ns.camera.sync.image.mode

I suspect the code wants to create the value: camera.sync.image.mode.

Thoughts?

@jacobperron
Copy link
Contributor

Nice catch, I think you're correct in your assessment. There's no guarantee that the topic name has inherited the node namespace. We should probably instead check if the topic prefix matches the node namespace to decide if we should remove the prefix.

It would be nice to see a simple test case demonstrating the issue.

Pull requests welcome :)

@jacobperron jacobperron added the bug label Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants