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

Document various online signal smoothing algorithms #1014

Merged
merged 3 commits into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions doc/examples/realtime_servo/realtime_servo_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,28 @@ An example of using the pose commands in the context of servoing to open a door
.. code-block:: bash

ros2 launch moveit2_tutorials pose_tracking_tutorial.launch.py

Signal Smoothing
----------------

Reviewing :moveit_codedir:`servo_parameters.yaml <moveit_ros/moveit_servo/config/servo_parameters.yaml>`, notice the parameter `smoothing_filter_plugin_name`. This helps smooth out any irregularities in joint commands to the robot, for example if there is an inconsistent period between commands. It can greatly reduce wear-and-tear on the robot's actuators and, in fact, many robots will not move unless incoming commands are sufficiently smooth. These are plugins so any user can write their own.

The current options are:

`online_signal_smoothing::ButterworthFilterPlugin`: This is a very simple low-pass filter, slightly more advanced than a moving average.

Benefits: computationally efficient, never overshoots the command in joint space.

Drawbacks: may deviate slightly from "straight line motion" in Cartesian space. Does not explicitly limit actuator jerk or acceleration.

`online_signal_smoothing::AccelerationLimitedPlugin`: This is an optimization-based algorithm that obeys the robot's acceleration limits (if feasible). Read more at https://github.com/moveit/moveit2/pull/2651

Benefits: Maintains the desired direction of motion as long as it's kinematically feasible to do so. Can be useful for "sharp corners." Ensures robot joint acceleration limits are not violated.

Drawbacks: Does not explicitly limit actuator jerk. Still can deviate from the intended direction of motion if the incoming command is not possible. May overshoot.

`online_signal_smoothing::RuckigFilterPlugin`: This uses the well-known `Ruckig library <https://github.com/pantor/ruckig>`_ to ensure robot motions always obey joint and acceleration limits. Read more at https://github.com/moveit/moveit2/pull/2956

Benefits: The smoothest option. Required for certain industrial robots.
Copy link
Contributor

@sea-bass sea-bass Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to clarify this is the smoothest in the joint/actuator space, but not necessarily Cartesian/task space (the drawback is something you already mention in less technical terms below)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't necessarily agree, it's still smooth in Cartesian space. Just doesn't necessarily move in the desired direction.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.


Drawbacks: Sometimes deviates from the intended direction of motion. For example, tends to make a swirling motion at sharp corners. To prevent the swirling motion requires extra logic on the incoming commands, outside of MoveIt Servo. May overshoot.
Loading