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

Allow unknown types in bag rewrite #1812

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

MichaelOrlov
Copy link
Contributor

@MichaelOrlov MichaelOrlov commented Sep 18, 2024

This PR will allow ros2 bag convert to process bag files with "unknown" message types.
Unknown are the types which typesupport is not available during the bag conversion operation.

Also added proper handling for the ament_index_cpp::PackageNotFoundError exception throwing from the ament_index_cpp::get_package_share_directory(package);. It was causing abnormal converter or recorder termination if the package for message definition was not found in ament_index.

@MichaelOrlov MichaelOrlov requested a review from a team as a code owner September 18, 2024 08:05
@MichaelOrlov MichaelOrlov requested review from gbiggs and jhdcs and removed request for a team September 18, 2024 08:05
@MichaelOrlov MichaelOrlov self-assigned this Sep 18, 2024
- Unhandled exception was causing rosbag2 converter or recorder to crash
if the corresponding package for message type was not found.

Signed-off-by: Michael Orlov <[email protected]>
Signed-off-by: Michael Orlov <[email protected]>
Copy link
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

@ahcorde
Copy link
Contributor

ahcorde commented Sep 23, 2024

Pulls: #1812
Gist: https://gist.githubusercontent.com/ahcorde/7de0137f97a41986a0f805eb1abf597c/raw/c9e33724e3d5fda265a4e3a6eb2de990528518eb/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_cpp --packages-above-and-dependencies rosbag2_cpp
TEST args: --packages-above rosbag2_cpp --packages-above rosbag2_cpp
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14593

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

@ahcorde ahcorde merged commit cd7bd63 into rolling Sep 23, 2024
12 checks passed
@ahcorde ahcorde deleted the morlov/allow-unknown-types-in-bag-rewrite branch September 23, 2024 13:37
@MichaelOrlov
Copy link
Contributor Author

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

Copy link

mergify bot commented Sep 23, 2024

backport jazzy iron humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Sep 23, 2024
Signed-off-by: Michael Orlov <[email protected]>
(cherry picked from commit cd7bd63)
mergify bot pushed a commit that referenced this pull request Sep 23, 2024
Signed-off-by: Michael Orlov <[email protected]>
(cherry picked from commit cd7bd63)

# Conflicts:
#	rosbag2_cpp/src/rosbag2_cpp/message_definitions/local_message_definition_source.cpp
mergify bot pushed a commit that referenced this pull request Sep 23, 2024
Signed-off-by: Michael Orlov <[email protected]>
(cherry picked from commit cd7bd63)

# Conflicts:
#	rosbag2_cpp/src/rosbag2_cpp/message_definitions/local_message_definition_source.cpp
#	rosbag2_cpp/test/rosbag2_cpp/test_local_message_definition_source.cpp
MichaelOrlov added a commit that referenced this pull request Sep 23, 2024
Signed-off-by: Michael Orlov <[email protected]>
(cherry picked from commit cd7bd63)

Co-authored-by: Michael Orlov <[email protected]>
ahcorde pushed a commit that referenced this pull request Sep 24, 2024
* Allow unknown types in bag rewrite (#1812)

Signed-off-by: Michael Orlov <[email protected]>
(cherry picked from commit cd7bd63)
MichaelOrlov added a commit that referenced this pull request Sep 24, 2024
* Allow unknown types in bag rewrite (#1812)

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

# Conflicts:
#	rosbag2_cpp/src/rosbag2_cpp/message_definitions/local_message_definition_source.cpp

* Address merge conflicts during backporting

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

---------

Signed-off-by: Michael Orlov <[email protected]>
Co-authored-by: Michael Orlov <[email protected]>
Co-authored-by: Alejandro Hernández Cordero <[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.

ros2 bag convert ignoring messages with unknown types
3 participants