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

print warning if event callback is not supported instead of passing e… #2648

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

fujitatomoya
Copy link
Collaborator

…xception.

replaces #2644

  • RMW implementation (in this particular case, that means rmw_zenoh) might not support those publisher / subscription event callbacks. I think that is okay to return UNSUPPORTED from RMW implementation. (RMW implementation does not have to support all RMW interfaces.)
  • It should not generate the exception if the underlying RMW implementation does not support this feature. because this can break the user application just to switch the rmw implementation when it starts running. (switching rmw_zenoh can generate the exception but rmw_fastrtps, this situation should be avoided.)

…xception.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Copy link
Collaborator Author

@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.

@Yadunund @ahcorde
this is related to #2644, could you guys take a look?

Comment on lines -163 to +178
RCLCPP_DEBUG(
RCLCPP_WARN(
rclcpp::get_logger("rclcpp"),
"Failed to add event handler for incompatible qos; wrong callback type");
"Failed to add event handler for incompatible qos; not supported");
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think warning is more appropriate here, this is more visible for user that the callback type is not supported with this rmw implementation. besides, message is wrong, that is just not supported.

Copy link
Member

@Yadunund Yadunund left a comment

Choose a reason for hiding this comment

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

This is a much better solution! Thanks @fujitatomoya

@ahcorde
Copy link
Contributor

ahcorde commented Oct 9, 2024

Pulls: #2648
Gist: https://gist.githubusercontent.com/ahcorde/d54130fc9cfad4d3d085a9d80124daa7/raw/00d63472a38f1fd0b1fb2a881a59a01cf9c8b665/ros2.repos
BUILD args: --packages-above-and-dependencies rclcpp --packages-above-and-dependencies rclcpp
TEST args: --packages-above rclcpp --packages-above rclcpp
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14683

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

@ahcorde ahcorde merged commit 41d3a27 into rolling Oct 9, 2024
3 checks passed
@ahcorde ahcorde deleted the fujitatomoya/event-callback-not-supported branch October 9, 2024 13:22
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