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

Use math::SpeedLimiter inside controllers #810

Closed
chapulina opened this issue May 6, 2021 · 8 comments
Closed

Use math::SpeedLimiter inside controllers #810

chapulina opened this issue May 6, 2021 · 8 comments
Assignees
Labels
🏰 citadel Ignition Citadel enhancement New feature or request good first issue Good for newcomers

Comments

@chapulina
Copy link
Contributor

Controllers like diff_drive have a SpeedLimiter class inside them. This file is currently repeated inside these plugins:

  • diff_drive
  • ackermann_steering

Now that we have the ignition::math::SpeedLimiter class, we should use that and remove those custom limiters. The mecanum_drive plugin is already using that.

Desired behavior

  • all SpeedLimiter files are removed from ign-gazebo
  • diff_drive and ackermann_steering use math::SpeedLimiter

All tests should continue to pass.

Alternatives considered

We moved the SpeedLimiter to ign-math so we could use it in multiple places. An alternative is to keep duplicating the file, but that doesn't scale well. Plus, we made improvements and fixes to the limiter when porting it to math.

Implementation suggestion

Take a look at how the mecanum drive is using it.

@chapulina chapulina added enhancement New feature or request good first issue Good for newcomers labels May 6, 2021
@chapulina chapulina added the 🏰 citadel Ignition Citadel label May 6, 2021
@scpeters
Copy link
Member

For reference, 9bbcceb is the commit in #683 that changed the mecanum drive to use the ignition::math::SpeedLimiter

@LolaSegura
Copy link
Contributor

Hi I have been working on this issue and I noticed it has a 'citadel' tag. I was wondering, wouldn't it make sense to push this on the latest version (gazebo6) as I saw it hasn't been changed in either of the previous versions.

@scpeters
Copy link
Member

Hi I have been working on this issue and I noticed it has a 'citadel' tag. I was wondering, wouldn't it make sense to push this on the latest version (gazebo6) as I saw it hasn't been changed in either of the previous versions.

we have added some "guiding principles" to our ignitionrobotics.org/about page, but they haven't been deployed yet, so I'll excerpt one here:

<b>Updates</b>:
            New backwards compatible features are added to stable releases
            whenever possible. This way, users can take advantage of new features
            without the need to upgrade to a later release, and can postpone
            upgrade efforts until breaking changes are needed.

Since this change affects only the implementation of a controller and not the public API or a change in dependency version, it is backwards compatible. So we prefer to target the oldest supported version (citadel, ign-gazebo3) and then merge it forward. How does that sound?

It is also possible to target the newest branch and then backport, but we have a slight preference for targeting the older versions first and merging forwards.

@LolaSegura
Copy link
Contributor

That sounds good. I will be doing that, thank you for the reply.

@francocipollone
Copy link
Contributor

francocipollone commented May 24, 2021

Thanks @scpeters for the clarification.
So given that diff_drive_controller was added in citadel and ackerman_steering was added in dome, the next steps would be:

  • diff_drive_controller. Remove custom limiter in citadel
  • ackerman_steering_controller. Remove custom limiter in dome
  • Port diff_drive_controller changes from citadel to dome
  • Port diff_drive_controller and ackerman _steering_controller changes from dome to edifice
  • Port diff_drive_controller and ackerman _steering_controller changes from edifice to fortress/main

@scpeters
Copy link
Member

the next steps would be:

yes, precisely. Thanks for laying it out so clearly

@scpeters
Copy link
Member

  • diff_drive_controller. Remove custom limiter in citadel

see #833

@LolaSegura
Copy link
Contributor

LolaSegura commented May 27, 2021

  • ackermann_steering. Remove custom limiter in dome

see #837

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants