-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
I've identified a bug in the nav2_simple_commander package, specifically within the smoothPath function. This issue seems to have been introduced in commit 0d86469 on the Humble branch.
Description of the Issue:
The smoothPath function in the BasicNavigator class is incorrectly passing an extra self argument to the _smoothPathImpl method. This results in a TypeError as _smoothPathImpl receives one more argument than it expects.
Location of the Bug:
The issue is located in the smoothPath method definition:
def smoothPath(self, path, smoother_id='', max_duration=2.0, check_for_collision=False):
"""Send a `SmoothPath` action request."""
rtn = self._smoothPathImpl(
self, path, smoother_id, max_duration, check_for_collision)
Suggested Fix:
The extra self argument should be removed from the call to _smoothPathImpl. The corrected function call should be:
rtn = self._smoothPathImpl(path, smoother_id, max_duration, check_for_collision)
Impact:
This bug prevents the proper use of the smoothPath function, which is a critical feature for many applications using the nav2_simple_commander package for navigation tasks.