Skip to content

Added Swerve Drive Kinematics in mobile_robot_kinematics.rst #1712

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

Merged

Conversation

nitin2606
Copy link
Contributor

Description

This PR isolates documentation changes for the swerve drive controller, split from PR #1694 . It adds detailed kinematics explanations and a diagram for swerve drive robots with four independently controlled modules.

Changes
Added mobile_robot_kinematics.rst section on swerve drive kinematics, covering inverse/forward kinematics and odometry.
Included swerve_drive.svg to illustrate module orientations and velocity vectors.

Signed-off-by: nitin <nitinmaurya2606@gmail.com>
Signed-off-by: nitin <nitinmaurya2606@gmail.com>
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 for adding this to the docs.

There were some minor issues with rst syntax, where sphinx did not render that properly. Do you have any resource to a book or peer-reviewed journal covering the equations?

nitin2606 and others added 7 commits May 30, 2025 00:27
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Signed-off-by: nitin <nitinmaurya2606@gmail.com>
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.

image

  • wheel number 2 has still no outline
  • the left dimension arrow of $w$ is not in the middle of the wheel?
  • the vector notation of v_i is not needed (or has to be added to all vector variables)

The style is still not consistent with the other sketches, but I can polish that out later.

As I asked before: Do you have any resource to a book or peer-reviewed journal covering the equations?

bmagyar
bmagyar previously approved these changes Jun 5, 2025
Copy link
Member

@bmagyar bmagyar left a comment

Choose a reason for hiding this comment

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

thank you!

@bmagyar
Copy link
Member

bmagyar commented Jun 5, 2025

@christophfroehlich with dark mode I get outlines...
Screenshot_Thu  5 Jun 19:16:26 BST 2025

@nitin2606
Copy link
Contributor Author

image

  • wheel number 2 has still no outline
  • the left dimension arrow of
    w
    is not in the middle of the wheel?
  • the vector notation of v_i is not needed (or has to be added to all vector variables)

The style is still not consistent with the other sketches, but I can polish that out later.

As I asked before: Do you have any resource to a book or peer-reviewed journal covering the equations?

The equations were derived independently based on general principles found in online resources, and are not directly taken from any specific book or peer-reviewed journal.

@nitin2606
Copy link
Contributor Author

@christophfroehlich with dark mode I get outlines... Screenshot_Thu 5 Jun 19:16:26 BST 2025

I am encountering the same issue. In dark mode, all outlines appear correctly, but in light mode, the outline for wheel 2 is not visible.

@bmagyar
Copy link
Member

bmagyar commented Jun 7, 2025

It is clear then. Everyone should always use dark mode. It was the better choice to begin with...

@bmagyar
Copy link
Member

bmagyar commented Jun 7, 2025

Jokes aside @nitin2606 , the border around that box seems to be set to white, as per @christophfroehlich 's screenshot. Try tweaking it by hand to match the rest

@christophfroehlich
Copy link
Contributor

you can just copy the format from one of the other drawio files in the repo. In the meantime, I try to review the formulas and/or find related stuff in the literature.

Signed-off-by: nitin <nitinmaurya2606@gmail.com>
@nitin2606
Copy link
Contributor Author

Jokes aside @nitin2606 , the border around that box seems to be set to white, as per @christophfroehlich 's screenshot. Try tweaking it by hand to match the rest

Please review my latest commit, ID: a50ff80 (Fixed Style Issue in swerve_drive.svg).

Copy link

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.23%. Comparing base (aebe6b1) to head (dffaaab).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1712   +/-   ##
=======================================
  Coverage   86.23%   86.23%           
=======================================
  Files         123      123           
  Lines       11902    11902           
  Branches      993      993           
=======================================
  Hits        10264    10264           
  Misses       1337     1337           
  Partials      301      301           
Flag Coverage Δ
unittests 86.23% <ø> (ø)

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

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

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.

I checked the equations, they seem to be fine.
https://ieeexplore.ieee.org/document/10307118 introduces them similarily.

https://doi.org/10.1007/s10846-022-01745-7 modeled a two-wheel swerve drive, but differently by means of ICR. But the result looks similar. Btw: they call it Pseudo-omnidirectional robot, which I could agree a bit.

I have two presentation-related suggestions, then I'm happy to merge.

nitin2606 and others added 2 commits June 17, 2025 18:43
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
…robot_kinematics.rst

Signed-off-by: nitin <nitinmaurya2606@gmail.com>
nitin2606 and others added 2 commits June 17, 2025 21:59
@christophfroehlich christophfroehlich added backport-humble This label should be used by maintainers only! Label triggers PR backport to ROS2 humble. backport-jazzy labels Jun 23, 2025
@christophfroehlich christophfroehlich merged commit e55ff02 into ros-controls:master Jun 23, 2025
20 of 26 checks passed
mergify bot pushed a commit that referenced this pull request Jun 23, 2025
Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at>
(cherry picked from commit e55ff02)
mergify bot pushed a commit that referenced this pull request Jun 23, 2025
Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at>
(cherry picked from commit e55ff02)
christophfroehlich added a commit that referenced this pull request Jun 23, 2025
…#1712) (#1771)

Co-authored-by: Nitin Maurya <97148529+nitin2606@users.noreply.github.com>
Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at>
christophfroehlich added a commit that referenced this pull request Jun 23, 2025
…#1712) (#1770)

Co-authored-by: Nitin Maurya <97148529+nitin2606@users.noreply.github.com>
Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-humble This label should be used by maintainers only! Label triggers PR backport to ROS2 humble. backport-jazzy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants