-
Notifications
You must be signed in to change notification settings - Fork 806
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 #438
Fix LoadFromBag assumptions causing C++ exceptions during serialization #438
Conversation
978e073
to
44cda3b
Compare
Hello @afrixs, can I get a review and approval is this solves your issue? |
Hello @Ryanf55, thank you for looking into this! I'll review and test it on Monday |
Thanks. If you have any bag files you can share to reproduce your failure, it would be much appreciated. I could cut them down and add a specific test for it. |
Hello,
Also, there are still some linting/uncrustify errors to fix in your code
|
* 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 Signed-off-by: Ryan Friedman <[email protected]>
Signed-off-by: Ryan Friedman <[email protected]>
99d8a40
to
204d490
Compare
I actually tested this code execution through GDB. Because there is only a single bool return from that function, I don't see a way we can test each case without refactoring and adding unit tests for each check. Thoughts? |
Signed-off-by: Ryan Friedman <[email protected]>
Signed-off-by: Ryan Friedman <[email protected]>
I've fixed the tests. They pass locally for me, but not in CI. I don't have time to chase it down right now, but as soon as CI is green, I'm happy to merge this. |
Signed-off-by: Ryan Friedman <[email protected]>
Signed-off-by: Ryan Friedman <[email protected]>
…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
@Mergifyio backport jazzy |
✅ Backports have been created
|
@Mergifyio backport iron |
…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)
✅ Backports have been created
|
…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)
@Mergifyio backport humble |
✅ Backports have been created
|
…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)
…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)
…on (#438) (#468) 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) Co-authored-by: Ryan <[email protected]>
…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)
Description
Demo
Details
I uploaded a super small bagfile of two chatter topics. It's very small:
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