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) #470

Open
wants to merge 1 commit into
base: humble
Choose a base branch
from

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
Copy link
Collaborator

Ryanf55 commented Jul 29, 2024

@wep21 Looks like nav2 broke ABI again with their rosdep sources. Thoughts on only compile nav2 from source on rolling?

@wep21
Copy link
Collaborator

wep21 commented Jul 29, 2024

@Ryanf55 How about adding if condition into vcs import block?

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Jul 29, 2024

@Ryanf55 How about adding if condition into vcs import block?

To make it only import them if $ROS_DISTRO==rolling?

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Jul 31, 2024

Interestingly, the humble branch doesn't contain that vcs import task. The failures here are from uncrustify, perhaps caused by a version difference between the binary in ubuntu 24 and the one in ubuntu 22. If the corresponding Iron PR fails CI too after I force-pushed it, I think it's pretty clear the code formatter changed and is going to mean backporting stuff regularly from Ubuntu 24 to Ubuntu 22 could be hard.

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.

2 participants