Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

velocity smoother deadband velocity broken since 1.1.7 #3699

Closed
Aposhian opened this issue Jul 17, 2023 · 2 comments · Fixed by #3690
Closed

velocity smoother deadband velocity broken since 1.1.7 #3699

Aposhian opened this issue Jul 17, 2023 · 2 comments · Fixed by #3690

Comments

@Aposhian
Copy link
Contributor

Aposhian commented Jul 17, 2023

Bug report

Required Info:

  • Operating System:
    • Ubuntu 22.04
  • ROS2 Version:
    • Humble binaries
  • Version or commit hash:
    • 1.1.8
  • DDS implementation:
    • N/A

Steps to reproduce issue

ros2 run nav2_velocity_smoother velocity_smoother --ros-args -p 'deadband_velocity:=[0.25,0.0,0.0]'

In a separate terminal:

ros2 lifecycle set /velocity_smoother configure && ros2 lifecycle set /velocity_smoother activate
ros2 topic pub -r 20 /cmd_vel geometry_msgs/msg/Twist '{ linear: { x: 0.5 }}'

In a separate terminal:

ros2 topic echo /cmd_vel_smoothed --field linear.x

Expected behavior

It works on 1.1.6. /cmd_vel_smoothed.linear.x ramps up to full speed (0.5 in this case).

Actual behavior

On 1.1.8. /cmd_vel_smoothed.linear.x stays at 0 forever.

Additional information

I believe this was broken in 1.1.7 because the last_cmd_ is set after the deadband velocities are applied. This means that the last_cmd is clamped to 0 forever.

https://github.com/ros-planning/navigation2/blob/da5edbfd12efd0ba74cd6bb6bc8c8ad8ca9bd88a/nav2_velocity_smoother/src/velocity_smoother.cpp#L308

Workaround is to disable deadband_velocity.

Also, I think this only affects open loop mode.

@BriceRenaudeau
Copy link
Contributor

Sorry, the fix is here soon :#3690

@SteveMacenski
Copy link
Member

Merged! Backporting to iron / humble shortly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants