Single MK4i Swerve module kinematics to drive 3 wheeled robot

Hey there, I’m currently in the process of fabriating a 3 wheeled AMR with a single M4i swerve module and talon motors on the front as the driving wheel and two support wheel in the rear [image attached below]. How would I be able to translate the Twist message coming from move_base to velocity and steering angle for the two motors in the module.

I’ve seen twist to ackermann conversions but that doesn’t seem to give any idea as I’m only using a single swere module. Is ackermann steering even approprite here?

I’ll be able to control the talons using either velocity control or percent output but how do I find the right amount of velocity/percent of driving motor and steering motor with respect to the received command velocity from ROS navigation stack.


1 Like

Are your “back” wheels in this case standard wheels or are they omni wheels which will allow any form of movement?

They are just standard wheels, no holonomic movement is required here.

Ackerman steering should be mostly applicable then it may do something weird with the fact the wheel bases don’t align but that shouldn’t have too major of an impact.

We actually have a history of driving robots like this. :slight_smile:
Most of the papers on Ackerman steering will assume 4 wheel swerve with independent rotation and turning about the center of the robot.
Your center of rotation should be the midpoint between the front two wheels. Anything else will create a lot of scrub on those wheels. We’ve a need in the past to use Ackerman, but not turning about the center of the robot.

I’ll point you to this class. The code might not be the cleanest, but you’ll get the idea. In your case, the “A” variable will be 1… meaning the center of rotation is always on the centerline of the front wheels. It even calculates the wheel angle for a center back wheel because that was our setup when we originally wrote this code in 2010.

Feel free to reach out over DMs if you have questions. And good luck with your nonstandard swerve drive!

edit: Forgot to mention. Look specifically at the “Steer” method. That is our implementation of Ackerman steering in this code.


A way to think about Ackerman is to pick a point out in space either to the left or right side of your robot. All your wheels angles should be perpendicular to the line between the wheel and the point. Your wheel speeds will be based on the distance from that wheel to the point in space (turning radius). We just took a ratio of each of the speeds and multiplied them by a joystick input… basically a throttle.

The point in space in determined by point forward and back on the length of the robot you chose (the A variable above) and the amount of turn as an input from the driver. Straight drive (no turn) sets a point infinitely far away. Full turn sets a point at the midpoint between the front two wheels.

An interesting aside… we actually used a steering wheel for the operator input for the turn.

I’d encourage you to do this Trig yourself to understand what is supposed to be happening.


Thanks a lot jefferson, this acts as a starting point, will look into your code and get back with updates.

1 Like

OP, take a look at 525 in 2016.


(post deleted because I misread the question)