ros2 / ros1_bridge

ROS 2 package that provides bidirectional communication between ROS 1 and ROS 2
Apache License 2.0
421 stars 274 forks source link

[Warnings] rosidl_cmake is deprecated, rclcpp::get_typesupport_handle as well #434

Open mikaelarguedas opened 2 months ago

mikaelarguedas commented 2 months ago

Warnings without this PR:

/opt/ros/rolling/lib/python3.12/site-packages/rosidl_cmake/__init__.py:19: UserWarning: The 'rosidl_cmake' Python module is deprecated. Use 'rosidl_pycommon' instead.
  warnings.warn(

comes from https://github.com/ros2/rosidl/pull/696

Without this PR the following warnings swarm the output:

/home/mikael/dev/ros/ros1_bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp: In constructor ‘ros1_bridge::Factory<ROS1_T, ROS2_T>::Factory(const std::string&, const std::string&)’:
/home/mikael/dev/ros/ros1_bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:48:53: warning: ‘const rosidl_message_type_support_t* rclcpp::get_typesupport_handle(const std::string&, const std::string&, rcpputils::SharedLibrary&)’ is deprecated: Use `get_message_typesupport_handle` instead [-Wdeprecated-declarations]
   48 |       type_support_ = rclcpp::get_typesupport_handle(
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
   49 |         ros2_type_name, "rosidl_typesupport_cpp",
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
   50 |         *ts_lib_);
      |         ~~~~~~~~~                                    
In file included from /opt/ros/rolling/include/rclcpp/rclcpp/generic_publisher.hpp:31,
                 from /opt/ros/rolling/include/rclcpp/rclcpp/node.hpp:46,
                 from /opt/ros/rolling/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/rolling/include/rclcpp/rclcpp/executors.hpp:22,
                 from /opt/ros/rolling/include/rclcpp/rclcpp/rclcpp.hpp:172,
                 from /home/mikael/dev/ros/ros1_bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:25:
/opt/ros/rolling/include/rclcpp/rclcpp/typesupport_helpers.hpp:55:1: note: declared here
   55 | get_typesupport_handle(
      | ^~~~~~~~~~~~~~~~~~~~~~

comes from https://github.com/ros2/rclcpp/pull/2209

mikaelarguedas commented 2 months ago

CI is failing as it tracks rolling that is now on ubuntu jammy