Fix SpeedLimiter Constructor regression #1478
Open
+17
−24
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.
After the #1315 and recent tag 4.18.0
I observed a regression in a controller that the SpeedLimiter is offering 2 constructors with default argument and this creates the following error:
error: call of overloaded 'SpeedLimiter()' is ambiguous
I think it makes sense to have the new constructor more explicit without any default arguments. Moreover, the construction
limiter_angular_(std::numeric_limits<double>::quiet_NaN())
still doesn't help as it is still implicitly casting things to the deprecated constructordiff_drive_controller.cpp:50:1: warning: ‘diff_drive_controller::SpeedLimiter::SpeedLimiter(bool, bool, bool, double, double, double, double, double, double)’ is deprecated [-Wdeprecated-declarations]
I decided to fix this also in the same PR by changing them to unique_ptr. I don't think it should be a problem as the controller is used as a plugin.