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

Make message name available as a constexpr in type traits. #734

Open
adityapande-1995 opened this issue Mar 30, 2023 · 0 comments
Open

Make message name available as a constexpr in type traits. #734

adityapande-1995 opened this issue Mar 30, 2023 · 0 comments
Labels
backlog enhancement New feature or request

Comments

@adityapande-1995
Copy link

Feature request

Feature description

Currently, in rosidl message type traits, there is no way to access the name of the message as a constexpr. The :name() function provides a const char* access to the name, which is not the same as constexpr.

This feature is needed when writing pythind typecasters. The macro PYBIND11_TYPE_CASTER(cpp::msg::type, const_name(msg_name)) requires access to a constexpr msg_name which is not the same as const char*. That name is an optional argument and is used as a docstring internally, but it would be nice to have it populated.

Implementation considerations

We could add a new global member like : constexpr const char[] complete_name = "geometry_msgs/msg/Quaternion";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants