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 warning on qos profile when creating service on odrive_can_node #12

Closed
wants to merge 1 commit into from

Conversation

maxipalay
Copy link

@maxipalay maxipalay commented Feb 26, 2024

When building on ros2 iron, there's a warning on the QoS of the service request_axis_state.

   44 |     service_ = rclcpp::Node::create_service<AxisState>("request_axis_state", std::bind(&ODriveCanNode::service_callback, this, _1, _2), srv_qos.get_rmw_qos_profile());
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/iron/include/rclcpp/rclcpp/node.hpp:1611,
                 from /opt/ros/iron/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/iron/include/rclcpp/rclcpp/executors.hpp:22,
                 from /opt/ros/iron/include/rclcpp/rclcpp/rclcpp.hpp:167,
                 from /.../odrive_can/include/odrive_can_node.hpp:4,
                 from /.../odrive_can/src/odrive_can_node.cpp:1:
/opt/ros/iron/include/rclcpp/rclcpp/node_impl.hpp:190:1: note: declared here
  190 | Node::create_service(
      | ^~~~
---

This PR removes the warning. It also leaves consistency, because this warning was not thrown on other service and topic declarations which used QoS in the suggested way.

Copy link
Member

@samuelsadok samuelsadok left a comment

Choose a reason for hiding this comment

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

Unfortunately this does not build on Humble (see CI checks), in fact it reverses the fix in #4.

I haven't checked what's the ideal way address this without warnings in both versions but if you find one that would be cool! (worst case it would involve #if-logic but maybe there's a sleeker way.)

You can open this repo in either of the included Dev Containers (e.g. in VSCode) for easily testing compilation on both ROS versions.

@maxipalay
Copy link
Author

Thanks for getting back, apologies for the oversight. Will take a look

@maxipalay
Copy link
Author

This looks like its one of those one-branch-per-ros-distribution kind of issue. But I don't think it's worth it for a warning, especially with the added complexity of maintaining multiple branches.

They changed this from humble->iron and just deprecated the previous way of doing it.

@maxipalay maxipalay closed this Feb 26, 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.

2 participants