Skip to content

Use rclcpp type support helpers in rosbag2_cpp#2017

Merged
MichaelOrlov merged 1 commit intorollingfrom
morlov/use-rclcpp-typesupport-helpers
Aug 7, 2025
Merged

Use rclcpp type support helpers in rosbag2_cpp#2017
MichaelOrlov merged 1 commit intorollingfrom
morlov/use-rclcpp-typesupport-helpers

Conversation

@MichaelOrlov
Copy link
Copy Markdown
Contributor

@MichaelOrlov MichaelOrlov commented May 24, 2025

Description

Historically, the type support helpers were implemented in the rosbag2_cpp/typesupport_helpers.cpp, then the implementation of the major helper functions was added to the core rclcpp package in the rclcpp/typesupport_helpers.hpp.
However, the original implementation was never removed from the rosbag2_cpp package.

This PR replaces original type support helpers in the rosbag2_cpp with the same functions from the core rclcpp package to avoid code duplication and divergences in the future.

Additional information

action-ros-ci-repos-supplemental: https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos

@MichaelOrlov MichaelOrlov force-pushed the morlov/use-rclcpp-typesupport-helpers branch from 13c68a6 to d7ee56a Compare May 25, 2025 00:16
MichaelOrlov added a commit to ros2/rclcpp that referenced this pull request May 25, 2025
- Rationale: We need to use this API in the Rosbag2
- Reference PR ros2/rosbag2#2017 in the Rosbag2

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
MichaelOrlov added a commit to ros2/rclcpp that referenced this pull request May 25, 2025
- Rationale: We need to use this API in the Rosbag2
- Reference PR ros2/rosbag2#2017 in the Rosbag2

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
MichaelOrlov added a commit to ros2/rclcpp that referenced this pull request May 25, 2025
- Rationale: We need to use this API in the Rosbag2
- Reference PR ros2/rosbag2#2017 in the Rosbag2

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Copy link
Copy Markdown
Contributor

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

While adding code for bug fixes and new features is often seen as an enhancement, I believe that reducing code like this is just as important for maintainability 🚀 rosbag2 repository has already so many packages to maintain... 😅

MichaelOrlov added a commit to ros2/rclcpp that referenced this pull request Jul 8, 2025
- Rationale: We need to use this API in the Rosbag2
- Reference PR ros2/rosbag2#2017 in the Rosbag2

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
MichaelOrlov added a commit to ros2/rclcpp that referenced this pull request Jul 8, 2025
* Expose extract_type_identifier and get_typesupport_library_path API

- Rationale: We need to use this API in the Rosbag2
- Reference PR ros2/rosbag2#2017 in the Rosbag2

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Use C++ style in doxygen documentation

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
mergify bot pushed a commit to ros2/rclcpp that referenced this pull request Jul 10, 2025
* Expose extract_type_identifier and get_typesupport_library_path API

- Rationale: We need to use this API in the Rosbag2
- Reference PR ros2/rosbag2#2017 in the Rosbag2

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Use C++ style in doxygen documentation

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
(cherry picked from commit 448287b)
mergify bot pushed a commit to ros2/rclcpp that referenced this pull request Jul 10, 2025
* Expose extract_type_identifier and get_typesupport_library_path API

- Rationale: We need to use this API in the Rosbag2
- Reference PR ros2/rosbag2#2017 in the Rosbag2

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Use C++ style in doxygen documentation

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
(cherry picked from commit 448287b)

# Conflicts:
#	rclcpp/include/rclcpp/typesupport_helpers.hpp
MichaelOrlov added a commit to ros2/rclcpp that referenced this pull request Jul 11, 2025
…port #2858) (#2902)

* Expose `typesupport_helpers` API needed for the Rosbag2 (#2858)

* Expose extract_type_identifier and get_typesupport_library_path API

- Rationale: We need to use this API in the Rosbag2
- Reference PR ros2/rosbag2#2017 in the Rosbag2

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Use C++ style in doxygen documentation

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
(cherry picked from commit 448287b)

# Conflicts:
#	rclcpp/include/rclcpp/typesupport_helpers.hpp

* Address merge conflicts

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Co-authored-by: Michael Orlov <morlovmr@gmail.com>
@MichaelOrlov MichaelOrlov marked this pull request as ready for review July 12, 2025 20:54
MichaelOrlov added a commit to ros2/rclcpp that referenced this pull request Jul 14, 2025
* Expose extract_type_identifier and get_typesupport_library_path API

- Rationale: We need to use this API in the Rosbag2
- Reference PR ros2/rosbag2#2017 in the Rosbag2



* Use C++ style in doxygen documentation



---------


(cherry picked from commit 448287b)

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Co-authored-by: Michael Orlov <morlovmr@gmail.com>
@MichaelOrlov MichaelOrlov force-pushed the morlov/use-rclcpp-typesupport-helpers branch from d7ee56a to f03de64 Compare July 24, 2025 00:50
skyegalaxy pushed a commit to irobot-ros/rclcpp that referenced this pull request Jul 25, 2025
…port ros2#2858) (ros2#2902)

* Expose `typesupport_helpers` API needed for the Rosbag2 (ros2#2858)

* Expose extract_type_identifier and get_typesupport_library_path API

- Rationale: We need to use this API in the Rosbag2
- Reference PR ros2/rosbag2#2017 in the Rosbag2

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Use C++ style in doxygen documentation

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
(cherry picked from commit 448287b)

# Conflicts:
#	rclcpp/include/rclcpp/typesupport_helpers.hpp

* Address merge conflicts

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Co-authored-by: Michael Orlov <morlovmr@gmail.com>
Signed-off-by: Michael Orlov <morlovmr@gmail.com>
@MichaelOrlov MichaelOrlov force-pushed the morlov/use-rclcpp-typesupport-helpers branch from f03de64 to f2c2631 Compare July 26, 2025 05:21
@MichaelOrlov
Copy link
Copy Markdown
Contributor Author

Pulls: #2017
Gist: https://gist.githubusercontent.com/MichaelOrlov/709700e35881b1003fde7e42a93393ce/raw/aefba88fd03f32e8cd640d492ca5ae0e5ab9b057/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_cpp rosbag2_transport rosbag2_tests
TEST args: --packages-above rosbag2_cpp rosbag2_transport rosbag2_tests
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/16617

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

@MichaelOrlov
Copy link
Copy Markdown
Contributor Author

@christophebedard @fujitatomoya The CI is green, this PR is ready for review.

Copy link
Copy Markdown
Contributor

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

lgtm with green CI

skyegalaxy added a commit to irobot-ros/rclcpp that referenced this pull request Jul 28, 2025
* QoSInitialization::from_rmw does not validate invalid history policy values, leading to silent failures (ros2#2841) (ros2#2845)

(cherry picked from commit 73e9bfb)

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

* get_all_data_impl() does not handle null pointers properly, causing segmentation fault (backport ros2#2840) (ros2#2851)

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

* Added missing chrono includes (ros2#2854) (ros2#2856)

(cherry picked from commit 373a63c)

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

* Fix for memory leaks in rclcpp::SerializedMessage (ros2#2861) (ros2#2864)

(cherry picked from commit 8d44b95)

Signed-off-by: Michael Orlov <morlovmr@gmail.com>
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Co-authored-by: Michael Orlov <morlovmr@gmail.com>
Co-authored-by: kylemarcey <marcey.kyle@gmail.com>

* Replace std::default_random_engine with std::mt19937 (humble) (ros2#2847) (ros2#2867)

(cherry picked from commit a0e2240)

Signed-off-by: keeponoiro <keeeeeeep@gmail.com>
Co-authored-by: keeponoiro <keeeeeeep@gmail.com>

* Changelog

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>

* 28.1.10

* fix test_publisher_with_system_default_qos. (ros2#2881) (ros2#2883)

(cherry picked from commit e6577c6)

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

* Shutdown deadlock fix jazzy (ros2#2887)

* fix: Don't deadlock if removing shutdown callbacks in a shutdown callback

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>

* refactor: Made fix API compatible

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>

---------

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Co-authored-by: Janosch Machowinski <J.Machowinski@cellumation.com>

* Event exec timer fix for ros2#2889 (ros2#2890)

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Signed-off-by: Janosch Machowinski <jmachowinski@users.noreply.github.com>
Co-authored-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

* Add overload of `append_parameter_override` (ros2#2891) (ros2#2895)

(cherry picked from commit fa0cf2d)

Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com>
Co-authored-by: Patrick Roncagliolo <ronca.pat@gmail.com>

* Fujitatomoya/test append parameter override (ros2#2896) (ros2#2900)

(cherry picked from commit 84c6fb1)

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

* [jazzy] Expose `typesupport_helpers` API needed for the Rosbag2 (backport ros2#2858) (ros2#2902)

* Expose `typesupport_helpers` API needed for the Rosbag2 (ros2#2858)

* Expose extract_type_identifier and get_typesupport_library_path API

- Rationale: We need to use this API in the Rosbag2
- Reference PR ros2/rosbag2#2017 in the Rosbag2

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Use C++ style in doxygen documentation

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
(cherry picked from commit 448287b)

# Conflicts:
#	rclcpp/include/rclcpp/typesupport_helpers.hpp

* Address merge conflicts

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Co-authored-by: Michael Orlov <morlovmr@gmail.com>

* Add qos parameter for wait_for_message function (ros2#2903) (ros2#2906)

(cherry picked from commit 2fcef70)

Signed-off-by: Sriharsha Ghanta <ghanta1996@gmail.com>
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Co-authored-by: Sriharsha Ghanta <ghanta_sriharsha@mymail.sutd.edu.sg>
Co-authored-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>

* Fix `start_type_description_service` param handling (ros2#2897) (ros2#2909)

* Fix `start_type_description_service` param handling



* Add test



* Demonstrate different exceptions depending on node options



* Same exact exception and `what()` message in both cases



* Uncrustify



---------


(cherry picked from commit 4fb558a)

Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com>
Co-authored-by: Patrick Roncagliolo <ronca.pat@gmail.com>

---------

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Michael Orlov <morlovmr@gmail.com>
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Signed-off-by: keeponoiro <keeeeeeep@gmail.com>
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Signed-off-by: Janosch Machowinski <jmachowinski@users.noreply.github.com>
Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com>
Signed-off-by: Sriharsha Ghanta <ghanta1996@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Michael Orlov <morlovmr@gmail.com>
Co-authored-by: kylemarcey <marcey.kyle@gmail.com>
Co-authored-by: keeponoiro <keeeeeeep@gmail.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Janosch Machowinski <jmachowinski@users.noreply.github.com>
Co-authored-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Co-authored-by: Patrick Roncagliolo <ronca.pat@gmail.com>
Co-authored-by: Sriharsha Ghanta <ghanta_sriharsha@mymail.sutd.edu.sg>
@MichaelOrlov
Copy link
Copy Markdown
Contributor Author

@ros-pull-request-builder retest this please

@MichaelOrlov
Copy link
Copy Markdown
Contributor Author

@ros-pull-request-builder retest this please

@MichaelOrlov MichaelOrlov merged commit bc37cdf into rolling Aug 7, 2025
12 checks passed
@MichaelOrlov MichaelOrlov deleted the morlov/use-rclcpp-typesupport-helpers branch August 7, 2025 23:20
@MichaelOrlov
Copy link
Copy Markdown
Contributor Author

https://github.com/Mergifyio backport kilted jazzy

@mergify
Copy link
Copy Markdown

mergify bot commented Aug 7, 2025

backport kilted jazzy

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Aug 7, 2025
Signed-off-by: Michael Orlov <morlovmr@gmail.com>
(cherry picked from commit bc37cdf)
mergify bot pushed a commit that referenced this pull request Aug 7, 2025
Signed-off-by: Michael Orlov <morlovmr@gmail.com>
(cherry picked from commit bc37cdf)

# Conflicts:
#	rosbag2_transport/src/rosbag2_transport/topic_filter.cpp
MichaelOrlov added a commit that referenced this pull request Aug 14, 2025
… (#2130)

* Use rclcpp typesupport helpers in rosbag2_cpp (#2017)

Signed-off-by: Michael Orlov <morlovmr@gmail.com>
(cherry picked from commit bc37cdf)

# Conflicts:
#	rosbag2_transport/src/rosbag2_transport/topic_filter.cpp

* Address merge conflicts

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Co-authored-by: Michael Orlov <morlovmr@gmail.com>
Co-authored-by: Michael Orlov <michael.orlov@apex.ai>
MichaelOrlov added a commit that referenced this pull request Sep 16, 2025
(cherry picked from commit bc37cdf)

Signed-off-by: Michael Orlov <morlovmr@gmail.com>
Co-authored-by: Michael Orlov <morlovmr@gmail.com>
@marcoag marcoag mentioned this pull request Jan 25, 2026
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