Skip to content

Deprecate all spin_xxx functions in rclcpp namespace instead of spin. #2675

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

Open
fujitatomoya opened this issue Nov 17, 2024 · 1 comment · May be fixed by #2848
Open

Deprecate all spin_xxx functions in rclcpp namespace instead of spin. #2675

fujitatomoya opened this issue Nov 17, 2024 · 1 comment · May be fixed by #2848

Comments

@fujitatomoya
Copy link
Collaborator

Description

Comes from the discussion with Client WG, see meeting note for https://discourse.ros.org/t/next-client-library-wg-meeting-friday-8th-november-2024/40457/2

these functions promote a very bad pattern and have terrible performance, which may not be obvious without knowing their internal details.
In the implementation, any rclcpp::spin_xxx functions are called, it internally creates the Executor and destroys it every single time. this would be really performance issue for user application unless user does understand what they are doing with those functions.

Give deprecation warning and period those functions, and eventually removed from after next release.

in addition to this, we could also add a template to rclcpp::spin to take in the executor type.

@jncfa
Copy link

jncfa commented Apr 8, 2025

I would be open to work on this issue if it is ok 😄

if I understand correctly, the only function you want to keep is rclcpp::spin_node_until_future_complete right?

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 a pull request may close this issue.

2 participants