Skip to content

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

Merged
alsora merged 4 commits intoros2:rollingfrom
HansRobo:fix/spin_xx_with_context
Apr 6, 2024
Merged

Use the same context for the specified node in rclcpp::spin functions#2433
alsora merged 4 commits intoros2:rollingfrom
HansRobo:fix/spin_xx_with_context

Conversation

@HansRobo
Copy link
Copy Markdown
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 force-pushed the fix/spin_xx_with_context branch from 7cf56a9 to d56c99f Compare February 23, 2024 03:43
@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

HansRobo added 3 commits April 5, 2024 22:38
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
@fujitatomoya
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

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

alsora commented Apr 5, 2024

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

@alsora
Copy link
Copy Markdown
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
@HansRobo HansRobo deleted the fix/spin_xx_with_context branch April 8, 2024 11:16
@HansRobo
Copy link
Copy Markdown
Contributor Author

@fujitatomoya
I want to use rclcpp with this bug fix in Humble.
Could you backport this to humble? (optionally, iron)

(I'm not a maintainer so I wasn't sure if it was OK to use mergify.)

@HansRobo
Copy link
Copy Markdown
Contributor Author

HansRobo commented Sep 2, 2024

@fujitatomoya friendly ping

@fujitatomoya
Copy link
Copy Markdown
Collaborator

@HansRobo sorry, missed that. this does not break ABI, so i think we can do backport.

@Mergifyio backport humble iron

@fujitatomoya
Copy link
Copy Markdown
Collaborator

Mergifyio is not responding, and i see a couple of conflicts need to resolve there.

fujitatomoya added a commit that referenced this pull request Sep 3, 2024
…#2433)

This is backport of #2433 because of the code base difference.

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

@HansRobo since the code base difference, i created the iron backport PR with #2618. can you review that?

@HansRobo
Copy link
Copy Markdown
Contributor Author

HansRobo commented Sep 5, 2024

@fujitatomoya Thanks! I'll review it.
By the way, backporting to Humble is difficult?

@fujitatomoya
Copy link
Copy Markdown
Collaborator

@HansRobo i do not think so, once #2618 is merged, we can backport it to humble.

@fujitatomoya
Copy link
Copy Markdown
Collaborator

@HansRobo all backports including humble have been completed.

@HansRobo
Copy link
Copy Markdown
Contributor Author

Thank you!!

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.

3 participants