Skip to content

Add cmd_vel_controller #1801

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Amronos
Copy link
Contributor

@Amronos Amronos commented Jul 5, 2025

This is a controller designed to filter command velocity. It subscribes to the /cmd_vel topic, filters the velocity, and then commands reference interfaces of Mobile Robot Controllers alongside publishing the filtered velocity on the /cmd_vel_out topic.

It includes/will include the following features:

  • Limiting of command velocity
  • PID filtering of command velocity, using /odom for feedback.
  • Some features of the nav2_velocity_smoother (Future Work)

I am creating a draft PR for now, as I would like to get feedback on the controller even though it is not complete yet. There are no docs or tests yet. I will add them soon.

Related to #1676 and #1757.

@christophfroehlich
Copy link
Contributor

Initially I was thinking of making such a controller the default way in handling input processing in mobile platforms. But there are voice in not doing so for sake of simplicity for simple (beginner) setups. I'll discuss this in next week's PMC meeting, how to proceed with this PR and #300

@christophfroehlich
Copy link
Contributor

We discussed this in today's meeting:

  • We should revive Cartesian twist controller #300 and add it to the forward_command_controller package. Note that the twist_controller is for full 6DOF twist, while for mobile bases we normally have 2 or 3 DOFs only.
  • Instead of adding complexity for users to use a controller chain to add twist input processing, better create a library (header only?) and reuse that in all mobile base controllers. As we now have the rate limiters in control_toolbox repo, maybe this library would fit there as well? Do you want to take this and make a proposal for the API of this lib?

@Amronos
Copy link
Contributor Author

Amronos commented Jul 31, 2025

Regarding creating a library instead of a new controller:

  • I feel that if someone needs to use this controller, they are probably already using the pid_controller, to use which you do need controller chaining.
  • I also feel that adding this controller to all the mobile robot controllers will over-complicate them and make it harder for beginners to understand and implement a simple ros2_control setup.
  • The maintenance cost will also probably increase as one will need to maintain all the mobile robot controllers and the library.

@Amronos
Copy link
Contributor Author

Amronos commented Jul 31, 2025

I also made this diagram some time back, to assist with how I was envisioning control for my robot and expecting the cmd_vel_controller to be used:
Control Diagram

I hope this is helpful in understanding why I want to keep the cmd_vel_controller as a separate controller.

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 this pull request may close these issues.

2 participants