-
Notifications
You must be signed in to change notification settings - Fork 64
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 bond tests #76
Closed
Closed
Fix bond tests #76
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjcarroll why the change? why the difference with
bondpy
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
WaitingForSister
state doesn't have an implementation forHeartbeatTimeout
as you can see here:bond_core/bondcpp/include/bondcpp/BondSM_sm.h
Lines 67 to 79 in 5a79fec
This was causing a segfault in the
remoteNeverConnects
test:bond_core/test_bond/test/test_callbacks_cpp.cpp
Lines 98 to 107 in fb0fa11
I don't believe that this impacts behavior, just guards against an undefined condition that wasn't previously exposed from the unit tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not super familiar with
bond
's architecture, but if a heartbeat timeout can occur while waiting for sister, should said state handle that condition (even if ignoring it)? By implementingHeartbeatTimeout
I mean. That applies to bothbondcpp
andbondpy
(where I don't anif
clause like this one).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjcarroll bump (this is in the list of things to triage for Galactic)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC
ros2
bondcpp
has this new methodstart()
that resets the heartbeat timer, whilekinetic-devel
bondcpp
only reset the heartbeat timer the first time someone called Heartbeat. It probably wasn't possible for theWaitingForSister
state to seeHeartbeatTimeout
in ROS 1.Maybe the heartbeat timer should be reset only when the connection is formed? I also agree with @hidmic that
WaitingForSister
should implement that callback too, but the implementation should be a warning or error that the callback is unexpected.