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

Bugfix for rosbag2_cpp serialization converter #1814

Merged
merged 7 commits into from
Sep 25, 2024

Conversation

MichaelOrlov
Copy link
Contributor

@MichaelOrlov MichaelOrlov commented Sep 21, 2024

@MichaelOrlov MichaelOrlov force-pushed the morlov/fix-for-serialization-converter branch from 1686ebc to 705ae8e Compare September 21, 2024 01:51
- 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]>
@MichaelOrlov MichaelOrlov force-pushed the morlov/fix-for-serialization-converter branch 2 times, most recently from 69b3c8e to 1d37e18 Compare September 21, 2024 21:52
- 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]>
@MichaelOrlov MichaelOrlov force-pushed the morlov/fix-for-serialization-converter branch from 1d37e18 to c35cca3 Compare September 21, 2024 23:12
Signed-off-by: Michael Orlov <[email protected]>
@MichaelOrlov MichaelOrlov changed the title [wip] Bugfix for rosbag2_cpp serialization converter Bugfix for rosbag2_cpp serialization converter Sep 22, 2024
@MichaelOrlov MichaelOrlov marked this pull request as ready for review September 22, 2024 02:15
@MichaelOrlov MichaelOrlov requested a review from a team as a code owner September 22, 2024 02:15
@MichaelOrlov MichaelOrlov requested review from gbiggs, james-rms and fujitatomoya and removed request for a team September 22, 2024 02:15
@MichaelOrlov
Copy link
Contributor Author

Pulls: #1814
Gist: https://gist.githubusercontent.com/MichaelOrlov/7edb3db78c6c16f382dfbce73551159b/raw/8b648a41eb4c66a65d673f6944b28d3ccb59dd37/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_cpp
TEST args: --packages-above rosbag2_cpp
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14590

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

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

Re-run Windows CI build after an attempt to fix warnings

  • Windows Build Status

@MichaelOrlov MichaelOrlov requested review from clalancette and ahcorde and removed request for gbiggs and james-rms September 23, 2024 15:53
@MichaelOrlov
Copy link
Contributor Author

@clalancette We are getting a new warning on RHEL build from the

Sanitizers aren't supported by the compiler or environment - disabling

It is from the:

message(WARNING "Sanitizers aren't supported by the compiler or environment - disabling")

This warning appeared because I enabled sanitizer by default and RHEL build doesn't support them for some reason.

Please correct me if I am wrong, but if I understood correctly, merging with such a warning is not acceptable.
However, I don't want to remove such a warning at all or disable sanitizers by default on CI.
Meanwhile, I will try to implement a workaround by detecting the RHEL build in CMake and turning the sanitizers off before that check.
Please let me know if there are other options for a workaround or solution to those warning.

@clalancette
Copy link
Contributor

Please correct me if I am wrong, but if I understood correctly, merging with such a warning is not acceptable.

Yes, that's correct; we shouldn't merge with that warning.

However, I don't want to remove such a warning at all or disable sanitizers by default on CI.

I have a slightly different suggestion here, which is to not enable sanitizers in this PR. It is not integral to this PR, so I think it should be done separately.

In that separate PR, I think it is fine to skip the sanitizer on RHEL (or just downgrade the WARNING to STATUS), but at least it will be separate and easier to change/revert if we decide to do that later.

This reverts commit 7241963.

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

Okay, I disabled sanitizers by default, as @clalancette suggested. We will enable them and try to workaround the warning on the RHEL build in a separate PR.
Rerunning RHEL CI build

  • Linux-rhel Build Status

@MichaelOrlov MichaelOrlov merged commit 6e82f52 into rolling Sep 25, 2024
12 checks passed
@MichaelOrlov
Copy link
Contributor Author

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

@MichaelOrlov MichaelOrlov deleted the morlov/fix-for-serialization-converter branch September 25, 2024 20:01
Copy link

mergify bot commented Sep 25, 2024

backport jazzy iron

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Sep 25, 2024
* 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)
mergify bot pushed a commit that referenced this pull request Sep 25, 2024
* 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
MichaelOrlov added a commit that referenced this pull request Sep 26, 2024
* 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)

Co-authored-by: Michael Orlov <[email protected]>
MichaelOrlov added a commit that referenced this pull request Sep 26, 2024
#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]>
mergify bot added a commit that referenced this pull request Sep 26, 2024
#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
MichaelOrlov added a commit that referenced this pull request Oct 2, 2024
…) (backport #1823) (#1824)

* [iron] Bugfix for rosbag2_cpp serialization converter (backport #1814) (#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

* Address merge conflicts after automatic backporting

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

* Adjust tests for humble

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

* Address linker errors on RHEL 8

- 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]>

---------

Signed-off-by: Michael Orlov <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Michael Orlov <[email protected]>
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