Skip to content

[velocity_smoother] accel and deccel are inverted for negative speeds #3526

@doisyg

Description

@doisyg

Bug report

Required Info:

  • Operating System:
    • Ubuntu 22.04
  • ROS2 Version:
    • Humble
  • Version or commit hash:
    • lastest main
  • DDS implementation:
    • Cyclone

Steps to reproduce issue

    velocity_smoother = Node(
        package='nav2_velocity_smoother',
        name='root_velocity_smoother',
        executable='velocity_smoother',
        parameters=[
            # {'use_sim_time': use_sim_time},
            {'smoothing_frequency': 20.0},
            {'scale_velocities': False},
            {'feedback': 'OPEN_LOOP'},
            {'max_velocity': [0.5, 0.0, 0.8]},
            {'min_velocity': [-0.5, 0.0, -0.8]},
            {'velocity_timeout': 0.5},
            {'max_accel': [0.1, 0.0, 0.2]},
            {'max_decel': [-0.5, 0.0, -1.2]},
            ],
        remappings=[
            ('cmd_vel', 'cmd_vel_protected'),
            ('cmd_vel_smoothed', 'cmd_vel')],
        output='screen')

Expected behavior

accel and deccel are applied similarly on both direction

Actual behavior

accel and deccel are inverted when going backward (here 0.1m/s2 accel and 0.5 m/s2 deccel)

Forward:
Screenshot from 2023-04-06 10-00-10

Backward:
Screenshot from 2023-04-06 10-02-11

Same for angular accel/deccel

Screenshot from 2023-04-07 23-15-23

Screenshot from 2023-04-07 23-15-50

EDIT: angular velocities
Reporting for now, PR later

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