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

add expand_action_name APIs to action client and server #2601

Draft
wants to merge 1 commit into
base: rolling
Choose a base branch
from

Conversation

alsora
Copy link
Collaborator

@alsora alsora commented Aug 11, 2024

I noticed that ROS 2 action clients and servers don't have an API equivalent to get_topic_name or get_service_name that you can find in publishers, subscriptions, etc.

I often needed this API in my applications and I always end up with some ugly thing that would be better handled by the client library.
So I went to try to implement it... but I quickly discovered that the logic that we normally use for topics and services is not directly applicable to actions.
rcl actions don't store such name, moreover it looks like actions ignore remapping rules?

Looking at the RCL code I see that we don't have a remapping type for actions (only for namespaces, nodes, topics and services).
I guess that users could try to remap the underlying topics and services individually, but that seems the most error prone and ugly thing to do.

I tried to solve this issue at the rclcpp level, by providing an API that at least expands the namespace.
The API is named differently from its topics and services counterpart and has a different return type, to denote that it works differently.
It's not just a lookup, it's doing string manipulations with a non-negligible performance impact.

Let me know what you think

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 this pull request may close these issues.

1 participant