Skip to content

Bug in smoothPath Function of Simple Commander API on Humble Branch #4001

@brian7989

Description

@brian7989

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions