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

Noisy velocity command output #3380

Open
thibpn opened this issue Mar 11, 2025 · 3 comments
Open

Noisy velocity command output #3380

thibpn opened this issue Mar 11, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@thibpn
Copy link

thibpn commented Mar 11, 2025

Description

I'm trying to command in velocity a robot by publishing delta_twist commands. The output that I have in velocity_command is extremely noisy.
Here is an example on the first two axes :

Image

To understand where this noise comes from, I installed the source build (humble branch). By modifying it, I identified the Butterworth filter as the source of the noise. When I delete it, I get clean output.

From what I understand, the filter is applied on the joint_states_position + delta_theta. Then, to compute the velocity command :
velocity_command = (filtered(joint_states_position + delta_theta) - joint_states_position) / publish_period

So if my joint_state_position is noisy, my velocity_command will be noisy, which would not have been the case if we used delta_theta to compute velocity commands.

I wish to stay with the binary build. Is there a way to not use any smoothing plugin in Moveit Servo ?

ROS Distro

Humble

OS and version

Ubuntu 22.04

Source or binary build?

Binary

If binary, which release version?

2.5.8-1jammy.20250210.235402

If source, which branch?

No response

Which RMW are you using?

CycloneDDS

Steps to Reproduce

I send delta_twist commands. It need to be slow movement so that delta_theta ~ noise on joint_state.
Then plot velocity_command.

Expected behavior

velocity_command output should not be noisy.

Actual behavior

velocity_command output is noisy.

Backtrace or Console output

No response

@thibpn thibpn added the bug Something isn't working label Mar 11, 2025
@AndyZe
Copy link
Member

AndyZe commented Mar 11, 2025

It's completely optional to have a smoothing plugin as you can see here:

Or, you can try one of the other smoothing options described here:

https://moveit.picknik.ai/main/doc/examples/realtime_servo/realtime_servo_tutorial.html#signal-smoothing

@lparadasanmartin
Copy link

Hi @AndyZe , i'm very much interested into knowing how to deactivate the smoother filter !

I tried commenting the line # smoothing_filter_plugin_name: "online_signal_smoothing::ButterworthFilterPlugin" on my servo.yaml file but the filter seems to still apply.

How can I deactivate the smoother for sure ? Thanks a lot for your answer & help.

@sea-bass
Copy link
Contributor

sea-bass commented Mar 12, 2025

I think since you're using the Humble version, disabling smoothing (or any of the other plugin alternatives) is not available:

// Load the smoothing plugin

If you upgrade to the Jazzy or Rolling (main) version, there is a parameter to simply disable smoothing. For example:

You could also consider submitting a PR to Humble to support disabling smoothing, if you'd like to stay on that version. I imagine there's also an option to modify the low-pass filter coefficient in a way that smoothing is effectively a "no operation", without any code changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants