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

Fixed wait set test on zenoh #2644

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from

Conversation

ahcorde
Copy link
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
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
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"

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