Four wheel independent steering robot using Nav2 and ros2-control

Hi All

I wanted to share the progress I’ve made on the code my four wheel independent steering robot, zinger. The goal for this robot is to experiment with this drive system which allows movement in both forward and sideways directions as well as rotations. In the end I would like to create a robot that is able to navigate rough outdoor terrain.

So far I’ve written a controller that handles the coordination of the drive module steering angles and the wheel velocities for a given body motion (x-velocity vx, y-velocity vy and rotation w).
The transition between the current state and the desired state is handled by one of three motion profiles (linear, trapezoidal or s-curve) and the controller ensures that the drive modules are synchronized at all times during the transition.

Commands from the controller to the drive modules are send using the ROS2 control system. Using the JointGroupPositionController for the steering angles and the JointGroupVelocityController for the wheel velocities.

SLAM is done using the SLAM toolbox and a standard 2D LIDAR unit. And navigation is done using the Nav2 framework. The SMAC lattice planner is used for the global planning and the MPPI controller is used for the local paths. With the right setup this combination allows for omnidirectional movements.

The following video shows the robot navigating from one room in a complex to another room through a series of doorways. The robot is using all its directional capabilities during this movement.

The ROS2 packages can be found here:

More information can be found on linkedin and on my blog.

Would love to hear suggestions for improvements or any other kind of comments.

2 Likes

Nice work! I skimmed your blog. These swerve drive robots have a ton of advantages if the controller math can be figured out. Which hopefully you’ve done for everybody, now.

I had a paper that basically calculated where one wheel should go, then based the other wheel motions on that. Back then we called it master-slave kinematics (not a politically correct term, for sure).

If I remember right, the Jacobian approach you’ve taken doesn’t work for square robot bases.

I’d love to read that paper, have you got a title or a link for me? And would you be able to explain why the Jacobian approach doesn’t work with square bases?

Sure, here it is. But I look back on that math and I’m like, I can’t even follow it anymore :stuck_out_tongue:

The Jacobian not working with square bases had to do with it becoming rank-deficient, I think.

Thanks for that. And I guess the matrix becoming rank-deficient kinda makes sense. I guess I’ll have to find other ways to solve that.

In the end I’d like to make use of the method published by Seegmiller and Kelly: View article. Mainly because that works in 3 dimensions (aka with suspension and also with uneven terrain). I don’t know if that method is more robust for square robots.