Skip to content

Fixed wait set test on zenoh#2644

Closed
ahcorde wants to merge 1 commit intorollingfrom
ahcorde/rolling/fix_wait_set_zenoh
Closed

Fixed wait set test on zenoh#2644
ahcorde wants to merge 1 commit intorollingfrom
ahcorde/rolling/fix_wait_set_zenoh

Conversation

@ahcorde
Copy link
Copy Markdown
Contributor

@ahcorde ahcorde commented Oct 4, 2024

Fixed wait set test on zenoh

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Comment on lines +263 to +266
std::string rmw_implementation_str = std::string(rmw_get_implementation_identifier());
if (rmw_implementation_str != "rmw_zenoh_cpp") {
po.event_callbacks.deadline_callback = [](rclcpp::QOSDeadlineOfferedInfo &) {};
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@ahcorde i am not really sure what needs to be avoided here... what happens if this if statement is not there, exception? and this is user application does to configure PublisherOptions, that means just switching rmw would break the user application?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I believe if we run this test with rmw_zenoh, an exception will be thrown when rcl will initialize a liveliness or deadline event since we don't support this yet. This happens when we set certain event callbacks in pub/sub options which internally invoke rmw_publisher_event_init/rmw_subscription_event_init. See below.

108: C++ exception with description "Failed to initialize event: provided event_type 7 is not supported by rmw_zenoh_cpp, at /home/yadunund/ros2_rolling/src/ros2/rmw_zenoh/rmw_zenoh_cpp/src/rmw_event.cpp:60" thrown in the test body.

Having said that I think the way to address this would be to set the matched or qos_incompatible callbacks for po.event_callbacks and subscription_options.event_callbacks. instead of the liveliness or deadlines one if rmw_implementation_str == "rmw_zenoh_cpp"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Yadunund can we replace this with #2648? i think #2648 is more reasonable, and we do not need to bypass the tests for rmw_zenoh like this or any other rmw implementations that do not support this feature.

@ahcorde
Copy link
Copy Markdown
Contributor Author

ahcorde commented Oct 9, 2024

Thank you for the PR @fujitatomoya, closing this one

@ahcorde ahcorde closed this Oct 9, 2024
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