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

[humble] Bugfix for rosbag2_cpp serialization converter (backport #1814) (backport #1823) #1824

Merged
merged 4 commits into from
Oct 2, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Sep 26, 2024


This is an automatic backport of pull request #1814 done by [Mergify](https://mergify.com).
This is an automatic backport of pull request #1823 done by [Mergify](https://mergify.com).

#1823)

* Bugfix for rosbag2_cpp serialization converter (#1814)

* Bugfix for rosbag2 serialization converter

- Use rmw specific type support for rmw_serilize{deserialize} function
calls.
Note: It is ok for CycloneDDS to use introspection type support for
rmw_serilize{deserialize} functions. However, for FastRTPS it must be
rmw specific type support. e.g. rosidl_typesupport_cpp. Fix works for
both CycloneDDS and FastRTPS rmw.

Signed-off-by: Michael Orlov <[email protected]>

* Add test coverage for default rmv serialization format converter

Signed-off-by: Michael Orlov <[email protected]>

* Run test_serialization_converter for each rmw implementation

- Rationale: To make sure that the default serialization converter can
serialize and deserialize messages with all supported rmw
implementations. Since it uses rmw specific functions for serialization
and deserialization inside.

Signed-off-by: Michael Orlov <[email protected]>

* Address uncrustify formating warnings

Signed-off-by: Michael Orlov <[email protected]>

* Enable sanitizer by default

Signed-off-by: Michael Orlov <[email protected]>

* Address Windows build warnings

Signed-off-by: Michael Orlov <[email protected]>

* Revert "Enable sanitizer by default"

This reverts commit 7241963.

Signed-off-by: Michael Orlov <[email protected]>

---------

Signed-off-by: Michael Orlov <[email protected]>
(cherry picked from commit 6e82f52)

# Conflicts:
#	rosbag2_cpp/src/rosbag2_cpp/converter.cpp

* Address merge conflicts

Signed-off-by: Michael Orlov <[email protected]>

* Fix uncrustfy warning due to the different versions of uncrustify

Signed-off-by: Michael Orlov <[email protected]>

* Replace ament_add_gmock_test with ament_add_gmock

- Rationale:
 The ament_add_gmock_executable(..) and ament_add_gmock_test(..) macros
are not available on Iron distro.

Signed-off-by: Michael Orlov <[email protected]>

* Add missing dependencies from the std_msgs

Signed-off-by: Michael Orlov <[email protected]>

* Adjust writer_->create_topic(..) call in tests

- removed TopicId field initialization since it is absent on Iron

Signed-off-by: Michael Orlov <[email protected]>

---------

Signed-off-by: Michael Orlov <[email protected]>
Co-authored-by: Michael Orlov <[email protected]>
(cherry picked from commit a269cd4)

# Conflicts:
#	rosbag2_cpp/CMakeLists.txt
@mergify mergify bot requested a review from a team as a code owner September 26, 2024 16:54
@mergify mergify bot requested review from MichaelOrlov and hidmic and removed request for a team September 26, 2024 16:54
Copy link
Author

mergify bot commented Sep 26, 2024

Cherry-pick of a269cd4 has failed:

On branch mergify/bp/humble/pr-1823
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit a269cd4.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   rosbag2_cpp/include/rosbag2_cpp/converter_interfaces/serialization_format_converter.hpp
	modified:   rosbag2_cpp/include/rosbag2_cpp/converter_interfaces/serialization_format_deserializer.hpp
	modified:   rosbag2_cpp/include/rosbag2_cpp/converter_interfaces/serialization_format_serializer.hpp
	renamed:    rosbag2_cpp/src/rosbag2_cpp/rmw_implemented_serialization_format_converter.hpp -> rosbag2_cpp/include/rosbag2_cpp/rmw_implemented_serialization_format_converter.hpp
	modified:   rosbag2_cpp/package.xml
	modified:   rosbag2_cpp/src/rosbag2_cpp/converter.cpp
	modified:   rosbag2_cpp/src/rosbag2_cpp/rmw_implemented_serialization_format_converter.cpp
	modified:   rosbag2_cpp/src/rosbag2_cpp/serialization_format_converter_factory_impl.hpp
	new file:   rosbag2_cpp/test/rosbag2_cpp/test_serialization_converter.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   rosbag2_cpp/CMakeLists.txt

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot added the conflicts label Sep 26, 2024
@MichaelOrlov MichaelOrlov changed the title [iron] Bugfix for rosbag2_cpp serialization converter (backport #1814) (backport #1823) [humble] Bugfix for rosbag2_cpp serialization converter (backport #1814) (backport #1823) Sep 26, 2024
@MichaelOrlov
Copy link
Contributor

Pulls: #1824
Gist: https://gist.githubusercontent.com/MichaelOrlov/e08ec6439898af38def3bacc4ede761f/raw/e32d365aa99637cfe60e8a46a7ca15b190aae43e/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_cpp
TEST args: --packages-above rosbag2_cpp
ROS Distro: humble
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14651

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

- Use rcpputils::fs instead of the std::filesystem in tests. Since RHEL8
doesn't have adequate support for the std::filesystem.

Signed-off-by: Michael Orlov <[email protected]>
@MichaelOrlov
Copy link
Contributor

Re-run CI after an attempt to fix RHEL8 linker errors by switching to the rcpputils::fs
Pulls: #1824
Gist: https://gist.githubusercontent.com/MichaelOrlov/e08ec6439898af38def3bacc4ede761f/raw/e32d365aa99637cfe60e8a46a7ca15b190aae43e/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_cpp
TEST args: --packages-above rosbag2_cpp
ROS Distro: humble
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14652

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

@MichaelOrlov
Copy link
Contributor

Warnings in RHEL 8 build with messages no CONNEXTDDS_DIR nor NDDSHOME specified is a known issue and unrelated to the changes from this PR. Merging then.

@MichaelOrlov MichaelOrlov merged commit d256a5b into humble Oct 2, 2024
14 checks passed
@MichaelOrlov MichaelOrlov deleted the mergify/bp/humble/pr-1823 branch October 2, 2024 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant