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

Use the same context for the specified node in rclcpp::spin functions #2433

Merged
merged 4 commits into from Apr 6, 2024

Conversation

HansRobo
Copy link
Contributor

Currently, rclcpp::spin functions, rclcpp::spin, rclcpp::spin_some, and so on, use the default context.
However they may occur errors when you use the custom context for the specified node of argument of spin functions.

In this pull-request, I set in-place executor to use context of node via executor options.

This is the only fix I found, but there may be other similar fixes.

@HansRobo HansRobo changed the title Use the same conext for the specified node in rclcpp::spin functions Use the same context for the specified node in rclcpp::spin functions Feb 23, 2024
@alsora
Copy link
Collaborator

alsora commented Feb 29, 2024

The approach in the PR looks good to me.

There's several test failures.
Can you take a look?

We should also add a unit-test to verify that the executor is using the correct context

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, test is ideal.

@alsora
Copy link
Collaborator

alsora commented Apr 2, 2024

@HansRobo FYI, the feature freeze for Jazzy will be in ~2 weeks, would you be able to add tests before that date?
Otherwise this PR will need to go in the next release.

Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
@fujitatomoya
Copy link
Collaborator

@HansRobo thanks for adding test, i have a question for test.

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@fujitatomoya
Copy link
Collaborator

@alsora since you are interested in this PR. can you take a look at this? i will leave this to you.

@fujitatomoya
Copy link
Collaborator

@fujitatomoya fujitatomoya self-assigned this Apr 5, 2024
@fujitatomoya fujitatomoya requested a review from alsora April 5, 2024 21:09
@alsora
Copy link
Collaborator

alsora commented Apr 5, 2024

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@alsora
Copy link
Collaborator

alsora commented Apr 6, 2024

Merging with green full CI (the github action failure is unrelated)

@alsora alsora merged commit ea4c98c into ros2:rolling Apr 6, 2024
2 of 3 checks passed
@HansRobo HansRobo deleted the fix/spin_xx_with_context branch April 8, 2024 11:16
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.

None yet

3 participants