fix: reset header stamps to zero in reset methods to prevent timeout#2197
fix: reset header stamps to zero in reset methods to prevent timeout#2197Ishan1923 wants to merge 4 commits intoros-controls:masterfrom
Conversation
…bypass Signed-off-by: Ishan1923 <ecdev4ishan@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2197 +/- ##
=======================================
Coverage 84.77% 84.77%
=======================================
Files 153 153
Lines 15236 15241 +5
Branches 1322 1324 +2
=======================================
+ Hits 12916 12921 +5
Misses 1838 1838
Partials 482 482
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| const std::shared_ptr<rclcpp_lifecycle::LifecycleNode> & node) | ||
| { | ||
| msg.header.stamp = node->now(); | ||
| (void)node; |
There was a problem hiding this comment.
Why don't we use [[maybe_unused]]? It was made for this exact scenario.
There was a problem hiding this comment.
Yes using [[maybe_unused]] sounds much more better, I will use this then
There was a problem hiding this comment.
if we don't need the node object, why not change the function signature instead?
There was a problem hiding this comment.
I thought about that, but I wanted to avoid breaking API/ABI compatibility for downstream users. If breaking the ABI is acceptable for this target branch, just let me know and I will gladly change the signature.
There was a problem hiding this comment.
On rolling we can break API. For the backports, we should add the new signatures but keep the old ones with a deprecation warning.
There was a problem hiding this comment.
Got it, thanks for clarifying;
I'll update rolling with the direct signature change, and for the backport PRs I'll keep the old signatures with a [[deprecated]] warning delegating to the new ones.
Will push shortly
|
@christophfroehlich The function signatures have been updated for the
|
Signed-off-by: Ishan1923 <ecdev4ishan@gmail.com>
| controller_state_publisher_->try_publish(controller_state_msg_); | ||
| } | ||
|
|
||
| // store current ref (for open loop odometry) and update odometry |
There was a problem hiding this comment.
The edits in steering_controllers_library.cpp is not related to the fix, right?
So, why here?
|
This pull request is in conflict. Could you fix it @Ishan1923? |
Problem: When controllers reset their internal reference messages, the initialization functions assigned the current time (now()) to the new empty message's timestamp. This caused the message 'age' calculation to yield 0 seconds, which allowed the empty message to bypass safety timeout checks.
Solution:
Affected Controllers:
fix #1774