Skip to content

Add Swerve Drive Controller #1692

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

Conversation

nitin2606
Copy link

Description

This PR introduces the swerve_drive_controller, a new controller for swerve drive robots with four independently steerable wheels, enabling omnidirectional motion in ROS 2. It complements controllers like diff_drive_controller by supporting advanced mobile robot platforms.

Features

  • Supports geometry_msgs/msg/Twist or TwistStamped velocity inputs (x, y linear; z angular).
  • Publishes raw nav_msgs/msg/Odometry for user-defined post-processing.
  • Publishes /tf transforms (optional, if enable_odom_tf=true).
  • Configurable via YAML for wheel geometry and kinematic constraints.

Changes
Added swerve_drive_controller package (src/, include/, test/).
Exported as a pluginlib plugin (swerve_drive_controller_plugin.xml).
Updated ros2_controllers CMakeLists.txt and package.xml.
Included gtest tests (test/test_swerve_drive_controller.cpp) and config (test/config/test_swerve_drive_controller.yaml).

@christophfroehlich
Copy link
Contributor

Thank you for your contribution. But there is some chaos in the commit history now, can you please rebase your changes on top of master and force-push it once? In the future, you can just merge the master into this branch, even manually or using the github UI.

@nitin2606 nitin2606 closed this May 21, 2025
@nitin2606 nitin2606 force-pushed the feature/swerve-drive-controller branch from 5839bae to 51c5c08 Compare May 21, 2025 11:06
@nitin2606
Copy link
Author

nitin2606 commented May 21, 2025

@christophfroehlich PR #1692 was closed and couldn’t be reopened. I’ve created a new PR with feature/swerve-drive-controller, a single commit, and the latest files. Please review the new PR. Thanks!". Sorry for the inconvenience.

Added Swerve Drive Controller Package #1694 (new PR)

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