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

Merged
merged 1 commit into from
Nov 28, 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.

@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.

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Nov 28, 2024

@wep21 Thoughts on trying to get this fixed, and once it's merged, we do another bugfix release for all the distros?

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Nov 28, 2024

Rebased, fixed with ament_uncrustify /home/ryan/Dev/grid_map_ws/src/grid_map/grid_map_ros --reformat

…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 9cc0749 into humble Nov 28, 2024
2 checks passed
@Ryanf55 Ryanf55 deleted the mergify/bp/humble/pr-438 branch November 28, 2024 07:12
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