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

Make diff_drive_controller a ChainableControllerInterface (fixes #1457) #1485

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arthurlovekin
Copy link

Using dea3d3c as a reference, I made the diff_drive_controller into a ChainableControllerInterface. I used a RealtimeBuffer to handle the incoming velocity command messages, and I also added lifecycle checks and support for the speed_limiter that were not included in dea3d3c. I also added some tests that run the chainable controller in unchained mode, and I intend to test it in chained mode in one of my current projects (though I couldn't readily figure out how to make this into a test).

@christophfroehlich
Copy link
Contributor

Please always install pre-commit to avoid failing tests ;) otherwise, run it manually with pre-commit run --all

regarding tests: have a look at the mecanum controller, it is chainable anf there are exactly those tests already available

 with chained mode tests
@arthurlovekin arthurlovekin force-pushed the diff-drive-chainable-1457 branch from 19b7630 to a353628 Compare January 11, 2025 01:37
@arthurlovekin
Copy link
Author

I've fixed my formatting by running pre-commit run --all-files and added a test for chained mode, using the mecanum controller as a reference.

Copy link

codecov bot commented Jan 11, 2025

Codecov Report

Attention: Patch coverage is 75.18248% with 34 lines in your changes missing coverage. Please review.

Project coverage is 83.96%. Comparing base (0736e6c) to head (a353628).

Files with missing lines Patch % Lines
...iff_drive_controller/src/diff_drive_controller.cpp 67.08% 23 Missing and 3 partials ⚠️
...ive_controller/test/test_diff_drive_controller.cpp 86.20% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1485      +/-   ##
==========================================
+ Coverage   83.86%   83.96%   +0.10%     
==========================================
  Files         122      121       -1     
  Lines       11139    11241     +102     
  Branches      945      951       +6     
==========================================
+ Hits         9342     9439      +97     
- Misses       1487     1488       +1     
- Partials      310      314       +4     
Flag Coverage Δ
unittests 83.96% <75.18%> (+0.10%) ⬆️

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

Files with missing lines Coverage Δ
...ive_controller/test/test_diff_drive_controller.cpp 93.28% <86.20%> (-1.92%) ⬇️
...iff_drive_controller/src/diff_drive_controller.cpp 68.75% <67.08%> (-2.44%) ⬇️

... and 7 files with indirect coverage changes

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