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

Adding MecanumDrive plugin with Odom and Tf, with Tests. #2297

Merged
merged 25 commits into from
Mar 21, 2025

Conversation

muttistefano
Copy link

@muttistefano muttistefano commented Jan 24, 2024

🎉 New feature

Summary

Adding MecanumDrive plugin with Odom and Tf, with Tests.
Relative to #1665 , but targets gz-sim8, fixes an include error in the plugin and add tests.

Checklist

  • [ x] Signed all commits for DCO
  • [ x] Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Jan 24, 2024
@azeey
Copy link
Contributor

azeey commented Feb 2, 2024

Thanks for your contribution @muttistefano. Do you mind fixing the linter issues and signing off on your commit (see https://github.com/gazebosim/gz-sim/pull/2297/checks?check_run_id=20866188364).

@muttistefano
Copy link
Author

Hi @azeey , thanks for the answer.
I signed the commits but I don't understand the linter issue.

@azeey
Copy link
Contributor

azeey commented Feb 12, 2024

There are some trailing white spaces in the code (see https://github.com/gazebosim/gz-sim/actions/runs/7765649621/job/21405089973?pr=2297).

Stefano Mutti and others added 9 commits March 5, 2024 10:54
Signed-off-by: Stefano Mutti <[email protected]>
Signed-off-by: Stefano Mutti <[email protected]>
Signed-off-by: Stefano Mutti <[email protected]>
Signed-off-by: Stefano Mutti <[email protected]>
Signed-off-by: Stefano Mutti <[email protected]>
Signed-off-by: Stefano Mutti <[email protected]>
Signed-off-by: Stefano Mutti <[email protected]>
@will-44
Copy link

will-44 commented May 24, 2024

Hello !
I'm very interested in this PR (as I think a lot of people are). Do you think it could be merged into the main version?
Thank you very much for your help

@muttistefano
Copy link
Author

If I'm not mistaken, the checks are fine, the only thing missing is the review from @mjcarroll .
Thanks :)

azeey
azeey previously requested changes May 29, 2024
Copy link
Contributor

@azeey azeey left a comment

Choose a reason for hiding this comment

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

@muttistefano I think you've accidentally checked in a few files and directories (e.g. log, .vscode) to the pull request. Could you please remove them?

@muttistefano
Copy link
Author

My bad; it should be fixed now.

@azeey azeey self-requested a review June 10, 2024 18:55
@azeey
Copy link
Contributor

azeey commented Jun 18, 2024

Can you fix DCO?

@azeey azeey added the beta Targeting beta release of upcoming collection label Jul 29, 2024
using namespace std::chrono_literals;

/// \brief Test MecanumDrive system
class MecanumDriveTest : public InternalFixture<::testing::TestWithParam<int>>
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to run this multiple times. Can you change this to

Suggested change
class MecanumDriveTest : public InternalFixture<::testing::TestWithParam<int>>
class MecanumDriveTest : public InternalFixture<::testing::Test>

and change all the TEST_P in this file to TEST_F

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this has not been addressed yet.

Not a priority here, can be done separately

/////////////////////////////////////////////////
// See: https://github.com/gazebosim/gz-sim/issues/1175
// See: https://github.com/gazebosim/gz-sim/issues/630
TEST_P(MecanumDriveTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(PublishCmd))
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this is copied from the DiffDrive test, but can we first try to enable it and see if it doesn't work on the other platforms?

Copy link
Author

Choose a reason for hiding this comment

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

i don't quite get what do you mean, since my testing skills are weak.
do you mean changing GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX to something that enables the tests on other OSs ?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I think something like:

Suggested change
TEST_P(MecanumDriveTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(PublishCmd))
TEST_P(MecanumDriveTest, PublishCmd)

let's also not block on this

@azeey
Copy link
Contributor

azeey commented Jan 7, 2025

Hi @muttistefano, any updates on this PR?

@muttistefano
Copy link
Author

I will try to finish the pull today

muttistefano and others added 2 commits January 8, 2025 11:05
Signed-off-by: Stefano Mutti <[email protected]>
Signed-off-by: Stefano Mutti <[email protected]>
Signed-off-by: Stefano Mutti <[email protected]>
@muttistefano
Copy link
Author

I messed up the pull a bit; let me know if it's ok or if I should do something.
Thx

@TZECHIN6
Copy link

TZECHIN6 commented Feb 4, 2025

Hi, I am very interested in this PR, as I am running a project using this plugin. However, missing odom and tf (also the disappeared cmd_vel) topics introduce trouble of interacting with ROS via the bridge. I am working on ign-sim-6 due to ROS2 humble. Any update on this?

@muttistefano
Copy link
Author

I think i solved all the requests.

ahcorde added 5 commits March 11, 2025 13:41
Signed-off-by: Alejandro Hernandez Cordero <[email protected]>
Signed-off-by: Alejandro Hernandez Cordero <[email protected]>
Signed-off-by: Alejandro Hernandez Cordero <[email protected]>
@blue-assassin
Copy link

Hello, is this fix available now if yes do i need to just use apt update or is there another process?

@ahcorde ahcorde requested review from azeey and iche033 March 17, 2025 09:11
Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

@iche033 do you mind to take a look ?

Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

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

I tested running mecanum_drive world echo'ing the odom messages, and appears to be working as expected.

I left some minor comments only but the PR is good as is. Given that the PR has been around for a while, we can get this merged first and address the remaining comments separately.

using namespace std::chrono_literals;

/// \brief Test MecanumDrive system
class MecanumDriveTest : public InternalFixture<::testing::TestWithParam<int>>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this has not been addressed yet.

Not a priority here, can be done separately

/////////////////////////////////////////////////
// See: https://github.com/gazebosim/gz-sim/issues/1175
// See: https://github.com/gazebosim/gz-sim/issues/630
TEST_P(MecanumDriveTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(PublishCmd))
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I think something like:

Suggested change
TEST_P(MecanumDriveTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(PublishCmd))
TEST_P(MecanumDriveTest, PublishCmd)

let's also not block on this

"/model/foo/cmdvel", "/model/bar/odom");
}


Copy link
Contributor

Choose a reason for hiding this comment

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

remove empty line

@@ -26,9 +26,10 @@
#include <set>
#include <string>
#include <vector>
#include <chrono>
Copy link
Contributor

Choose a reason for hiding this comment

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

include headers in alphabetically order

@iche033 iche033 dismissed azeey’s stale review March 20, 2025 18:46

some comments can be addressed in a separate PR

ahcorde added 2 commits March 20, 2025 22:33
Signed-off-by: Alejandro Hernandez Cordero <[email protected]>
Signed-off-by: Alejandro Hernandez Cordero <[email protected]>
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

Attention: Patch coverage is 97.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 69.02%. Comparing base (ab18888) to head (3f39e2b).
Report is 152 commits behind head on gz-sim8.

Files with missing lines Patch % Lines
src/systems/mecanum_drive/MecanumDrive.cc 97.77% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           gz-sim8    #2297      +/-   ##
===========================================
+ Coverage    65.75%   69.02%   +3.27%     
===========================================
  Files          327      342      +15     
  Lines        31233    33300    +2067     
===========================================
+ Hits         20537    22986    +2449     
+ Misses       10696    10314     -382     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@iche033 iche033 enabled auto-merge (squash) March 21, 2025 02:07
@iche033 iche033 merged commit 5444b25 into gazebosim:gz-sim8 Mar 21, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

9 participants