-
Notifications
You must be signed in to change notification settings - Fork 412
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
subscriber callbacks bound to class methods do not compile #173
Comments
Can you make this a test case in system_tests/test_rclcpp instead? (I meant to post this comment on the pull request in examples, sorry if that was confusing.) |
Are you working on a fix for this right now? I will take a look if you're not actively working on it. |
@esteve found a workaround to use a lambda function. I'll add a unit test for it too. |
You mean using a lambda function in the example? Or to make bound functions work as the input to create_subscription? None of our tested rclcpp code so far uses Playing around with this, I found another "workaround" that compiles:
Ideally we would support any valid callback signature for create_subscription, so I think we should do the necessary work to make your example compile. |
@tfoote could you have a look at this branch and see if it works? Thanks. https://github.com/ros2/rclcpp/tree/std_bind_function_traits |
@tfoote I got your example compiling with my branch, I'll clean up the changes here and submit them for review. |
@esteve I can confirm that your branch works for me, but I see it's not a cross platform solution unfortunately :-( |
… compile but is expected re: ros2/rclcpp#173
@tfoote I got the workaround to compile on all three platforms in #183, I'll see if I can compile the |
fixed in #183 |
ros2#173) * expand rcl_node_is_valid with allocator to standarize the node check across RCL Current RCL use very different way for node check in different components. Actually, node.c already provide a standard way - rcl_node_is_valid. However, it just use internal allocator, but some context has external allocator. The commit expand rcl_node_is_valid with one more parameter for allocator. It can be used in all cases. Signed-off-by: jwang <jing.j.wang@intel.com> * Add allocator check in rcl_node_is_valid * Separate argument checks from the concept of what makes a node invalid * clarify allocator only used for error messages; default if NULL * shorten parameter description
It fails due to an inability to resolve an overloaded function.
The full error is here: https://gist.github.com/tfoote/17222805a01e7c05c3f1
The text was updated successfully, but these errors were encountered: