Skip to content

Conversation

@jmachowinski
Copy link
Contributor

Adding entities twice to a waitset is not allowed, and will introduce subtle bugs. Therefore the rcl_wait function will not explicitly check for duplicated entries in the waitset.

@wjwwood @mjcarroll @alsora This commit adds the check that we agreed on in the last client workgroup meeting

@jmachowinski jmachowinski force-pushed the check_for_duplicated_entities branch 3 times, most recently from f2041ac to 13ad17c Compare January 17, 2025 19:08
@jmachowinski
Copy link
Contributor Author

Pulls: #1206
Gist: https://gist.githubusercontent.com/jmachowinski/75562e3c9dd95204212810eff089a23e/raw/9813cf1dddd5efd5fb3ad11d7b432b8880f45ebd/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15195

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

@jmachowinski jmachowinski force-pushed the check_for_duplicated_entities branch from 13ad17c to 53a0d40 Compare February 17, 2025 09:23
@jmachowinski
Copy link
Contributor Author

Pulls: #1206
Gist: https://gist.githubusercontent.com/jmachowinski/a1610420370b149cc98a22cbf6f19c8c/raw/9813cf1dddd5efd5fb3ad11d7b432b8880f45ebd/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15203

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

@jmachowinski jmachowinski force-pushed the check_for_duplicated_entities branch from 53a0d40 to 1cdb729 Compare February 17, 2025 12:47
@jmachowinski
Copy link
Contributor Author

Pulls: #1206
Gist: https://gist.githubusercontent.com/jmachowinski/84c64ce2e17e4c2926602a6b879b4654/raw/9813cf1dddd5efd5fb3ad11d7b432b8880f45ebd/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15208

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

@jmachowinski
Copy link
Contributor Author

This need to be merged after ros2/rclcpp#2714, as this contains the fix for the two identical guard conditions added by the executor.

@jmachowinski
Copy link
Contributor Author

Pulls: #1206
Gist: https://gist.githubusercontent.com/jmachowinski/9ba939d7e6f462f79c660af54e56ce56/raw/9813cf1dddd5efd5fb3ad11d7b432b8880f45ebd/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15225

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

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 with green CI.

@fujitatomoya
Copy link
Collaborator

https://ci.ros2.org/job/ci_windows/23361/testReport/junit/(root)/test_launch_ros/pytest_missing_result/ is unrelated.

@jmachowinski if you want to wait for more reviews on this, please do that. i will leave this to you.

@alsora
Copy link
Contributor

alsora commented Mar 1, 2025

Besides the minor request to add a comment, could we have a unit-test for this?
Then the PR would be ready to merge IMO

@jmachowinski jmachowinski force-pushed the check_for_duplicated_entities branch from 1cdb729 to d1f6983 Compare March 11, 2025 10:37
@jmachowinski
Copy link
Contributor Author

Added a test case for duplicate timer and duplicate guard condition. I didn't add tests for subscribers and services, as the boilerplate for setup would be a bit much and it would check the identical code path.

Copy link
Member

@mjcarroll mjcarroll left a comment

Choose a reason for hiding this comment

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

LGTM and addresses @alsora's request.

One more CI and we are good to go here?

@alsora
Copy link
Contributor

alsora commented Mar 13, 2025

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

@jmachowinski jmachowinski force-pushed the check_for_duplicated_entities branch from d1f6983 to ae7e9a3 Compare March 13, 2025 14:43
@jmachowinski
Copy link
Contributor Author

Pulls: #1206
Gist: https://gist.githubusercontent.com/jmachowinski/313bac2cf0368d362a8f4c204f8eaac4/raw/9813cf1dddd5efd5fb3ad11d7b432b8880f45ebd/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15365

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

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

Do you mind to merge with rolling?

@fujitatomoya
Copy link
Collaborator

@Mergifyio rebase

@mergify
Copy link

mergify bot commented Oct 2, 2025

rebase

❌ Pull request can't be updated with latest base branch changes

Details

Mergify needs the author permission to update the base branch of the pull request.
@jmachowinski needs to authorize modification on its head branch.

@ahcorde
Copy link
Contributor

ahcorde commented Nov 6, 2025

@jmachowinski Do you mind to merge with rolling?

Adding entities twice to a waitset is not allowed, and will introduce
subtle bugs. Therefore the rcl_wait function will not explicitly check
for duplicated entries in the waitset.

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
@jmachowinski jmachowinski force-pushed the check_for_duplicated_entities branch from ae7e9a3 to e5479e2 Compare November 24, 2025 15:19
@jmachowinski
Copy link
Contributor Author

Pulls: #1206
Gist: https://gist.githubusercontent.com/jmachowinski/cefd44fd73da75d97b83ffcbbf310e78/raw/5e77b5f58a8799938ececf247ecd30dc74004d2e/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17589

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

5 participants