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

Fix LoadFromBag assumptions causing C++ exceptions during serialization (backport #438) #468

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jul 29, 2024

Description

  • Not all bags have only GridMap messages
  • Not all bags have GridMap on the right topic
  • Add test for trying to load a grid map from a bag that doesn't contain it on the expected topic
  • Add nullptr check on reader messages

Demo

image

Details

I uploaded a super small bagfile of two chatter topics. It's very small:

ryan@B650-970:~/Dev/ros2_ws/src/grid_map/grid_map_ros$ ll -h resource/double_chatter/
total 56K
drwxrwxr-x 2 ryan ryan 4.0K Feb 16 11:48 ./
drwxrwxr-x 3 ryan ryan 4.0K Feb 16 11:49 ../
-rw-r--r-- 1 ryan ryan  40K Feb 16 00:50 double_chatter.db3
-rw-rw-r-- 1 ryan ryan 4.8K Feb 16 11:48 metadata.yaml

It might be better to construct the bag file on the fly in the test case, but that would take much more time than what I did here.

Issue

Solves #401


This is an automatic backport of pull request #438 done by Mergify.

…on (#438)

Fix LoadFromBag assumptions

* Not all bags have only GridMap messages
* Not all bags have GridMap on the right topic
* Add test for trying to load a grid map from a bag that doesn't
  contain it on the expected topic
* Add nullptr check on reader messages
* Remove unused include
* Don't skip reporting when tests fail

(cherry picked from commit 25a1ea5)
@Ryanf55 Ryanf55 merged commit 747ddaa into jazzy Jul 31, 2024
2 checks passed
@Ryanf55 Ryanf55 deleted the mergify/bp/jazzy/pr-438 branch July 31, 2024 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ros2 Affects ROS 2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant