-
Notifications
You must be signed in to change notification settings - Fork 484
Unified Node Interfaces: Add const version of get_node_x_interface() #3006
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
Unified Node Interfaces: Add const version of get_node_x_interface() #3006
Conversation
…turns a const shared pointer which can be used in e.g. const member functions to access at least the const member functions of the node interfaces Signed-off-by: Fabian Hirmann <[email protected]>
|
Since you two were/are currently looking at my other PR #3002, I was hoping that you maybe could also look into that one too. If not, please let me know. After #3002 is merged, it would be great if you could also trigger backporting this change to Humble using mergifyio (and probably to all other ROS versions which are having the Many thanks, |
|
Pulls: #3006 |
fujitatomoya
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fabianhirmann this fails to build, you can see the build log here https://ci.ros2.org/job/ci_linux/26520/console.
guess that there are no such methods with signature generated by this macro?
|
Thank you for your comments @ahcorde and @alsora! I found the issue at the build and locally it successfully built on rolling now. The issue was that in #2075 the method for directly creating The question for me now is if I should also backport #2075 to Humble after #3002 is completed (or as part of #3002) such that the constructors of |
…g changes from ros2#2075 Signed-off-by: Fabian Hirmann <[email protected]>
fe5b48e to
45f9c67
Compare
|
Pulls: #3006 |
|
@ahcorde Thank you for triggering another build. I saw now that it is failing but from the logs it looks like there is another error at the build which is unrelated to my changes and looks like a general CI issue. Therefore it would be great if you could have a look on it (or just trigger another build). |
|
Pulls: #3006 |
Description
This small PR adds a const version of get_node_x_interface() which returns a const shared pointer.
Is this user-facing behavior change?
No
Did you use Generative AI?
No
Additional Information
This addition is required when the
NodeInterfacesclass is a member of a class and one then would like to use theNodeInterfacesclass member in a const member function of that class to access at least const member functions of the separate node interfaces. Without this addition this is not possible at all andNodeInterfacesclass members can only be accessed in non-const member functions.It would also be great if this can be backported to older versions as well (especially in my case to Humble which gets just now the unified node interfaces backported with #3002).