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

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

Conversation

nitin2606
Copy link

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?

Comment on lines +129 to +130
* :math:`l` is the wheelbase (distance between front and rear wheels).
* :math:`w` is the track width (distance between left and right wheels).
Copy link
Contributor

Choose a reason for hiding this comment

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

could you add this to the sketch?

Copy link
Contributor

Choose a reason for hiding this comment

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

wheel 2 in moving forward has a different style. Do you mind copying the style of the other sketches? I.e., font type and style of the wheels

Copy link
Contributor

Choose a reason for hiding this comment

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

and please add the definition of the steering angle, maybe to a detail view of a single wheel including v_{i,x}, v_{i,y}, l_{i,x} and l_{i,y}?


The `SwerveDriveKinematics` class updates the robot’s pose (:math:`x`, :math:`y`, :math:`\theta`) in the global frame using the computed chassis velocities. The global velocities are:

.. math::
Copy link
Contributor

@christophfroehlich christophfroehlich May 28, 2025

Choose a reason for hiding this comment

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

we should move this to a global place, because this is the same for all controllers here. But can be done in a follow-up PR

nitin2606 and others added 6 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>
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