Skip to content
New issue

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

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

Already on GitHub? # to your account

Add multi_omni_wheel_drive_controller #1535

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

Amronos
Copy link
Contributor

@Amronos Amronos commented Feb 12, 2025

This is a controller for mobile robots with omnidirectional drive. It supports using 3 or more omni wheels spaced at an equal angle from each other in a circular formation.

I have added many tests similar to other controllers and updated the docs.
Please review this controller and tell me if you have any doubts regarding its working.

I will be updating mobile_robot_kinematics.rst for the kinematics of this controller and for that wanted to ask what software has been used to make the diagrams in that doc. 😄

@christophfroehlich

This comment was marked as outdated.

@Amronos

This comment was marked as outdated.

@christophfroehlich

This comment was marked as outdated.

@Amronos
Copy link
Contributor Author

Amronos commented Feb 12, 2025

82b6d87 should fix some of the failures, the other ones I am not too sure on how to fix ff32b2d should fix the others.

@Amronos

This comment was marked as outdated.

@Amronos

This comment was marked as outdated.

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your contribution.

Why you named your controller multi_omni_wheel_drive_controller? why not just omni_wheel_drive_controller, or omni_drive_controller like our friends at PAL do call it?

The first review round, where I only had a look at the docs and the description. I just added some stylistic comments as well as changes to use standard nomenclature (like state interfaces instead of feedback). Just in case you don't know, you can commit them all at once from the "Files Changed" tab here.

Amronos and others added 2 commits February 15, 2025 09:37
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
@Amronos
Copy link
Contributor Author

Amronos commented Feb 15, 2025

Why you named your controller multi_omni_wheel_drive_controller? why not just omni_wheel_drive_controller, or omni_drive_controller like our friends at PAL do call it?

I didn't name it omni_drive_controller because I didn't want someone to get confused that it is based on mecanum wheels. I named it multi_omni_wheel_drive_controller instead of omni_wheel_drive_controller because I wanted to emphasize the fact that it can work with as many omni wheels as one would like, but now that I think about it omni_wheel_drive_controller would have also been nice.

- Pass angular positions and velocity to Odometry class
- Check if dt is too small in update_open_lopp() in Odometry class
- Improve the checks that determine if an odometry message should be published
Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

As it will take more time to review the controller itself, do you mind to open a PR with the updates to the mobile_robot_kinematics.rst in the meantime? We can merge that immediately then (making the actual code here faster to review for others).

@Amronos
Copy link
Contributor Author

Amronos commented Feb 20, 2025

As it will take more time to review the controller itself, do you mind to open a PR with the updates to the mobile_robot_kinematics.rst in the meantime? We can merge that immediately then (making the actual code here faster to review for others).

Created #1551.

@christophfroehlich
Copy link
Contributor

@robotcopper @mateusmenezes95 you have proposed an omni_drive controller in #1098, could you have a look and review this implementation please?

Copy link

codecov bot commented Mar 1, 2025

Codecov Report

Attention: Patch coverage is 87.45928% with 77 lines in your changes missing coverage. Please review.

Project coverage is 85.01%. Comparing base (9063d8f) to head (80e2c91).

Files with missing lines Patch % Lines
...ntroller/src/multi_omni_wheel_drive_controller.cpp 85.71% 21 Missing and 14 partials ⚠️
...er/test/test_multi_omni_wheel_drive_controller.cpp 92.22% 0 Missing and 15 partials ⚠️
multi_omni_wheel_drive_controller/src/odometry.cpp 80.28% 12 Missing and 2 partials ⚠️
...er/test/test_multi_omni_wheel_drive_controller.hpp 85.05% 10 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1535      +/-   ##
==========================================
+ Coverage   84.88%   85.01%   +0.12%     
==========================================
  Files         124      130       +6     
  Lines       11564    12178     +614     
  Branches      985     1064      +79     
==========================================
+ Hits         9816    10353     +537     
- Misses       1433     1476      +43     
- Partials      315      349      +34     
Flag Coverage Δ
unittests 85.01% <87.45%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ude/multi_omni_wheel_drive_controller/odometry.hpp 100.00% <100.00%> (ø)
...st/test_load_multi_omni_wheel_drive_controller.cpp 100.00% <100.00%> (ø)
...er/test/test_multi_omni_wheel_drive_controller.hpp 85.05% <85.05%> (ø)
multi_omni_wheel_drive_controller/src/odometry.cpp 80.28% <80.28%> (ø)
...er/test/test_multi_omni_wheel_drive_controller.cpp 92.22% <92.22%> (ø)
...ntroller/src/multi_omni_wheel_drive_controller.cpp 85.71% <85.71%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Successfully merging this pull request may close these issues.

[ROS2_controller] Add community controllers in "Controllers for Mobile Robots" list on ROS2_control doc
2 participants