> For the complete documentation index, see [llms.txt](https://hkust-robotics-team.gitbook.io/hkust-robotics-team-software-tutorial/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hkust-robotics-team.gitbook.io/hkust-robotics-team-software-tutorial/advanced-notes/mecanum-wheel.md).

# Mecanum Wheel

Mecanum wheelbase

<details>

<summary>Authors</summary>

Dicaprio Cheung

(Reference from HKUST Robocon Advance Tutorial 2023)

</details>

## Table of Content

[#prerequisite](#prerequisite "mention")

[#what-is-a-mecanum-wheel](#what-is-a-mecanum-wheel "mention")

[#how-does-it-work](#how-does-it-work "mention")

[#things-to-work-on](#things-to-work-on "mention")

## Prerequisite

You are recommended to read the [Omniwheel](/hkust-robotics-team-software-tutorial/advanced-notes/omniwheel.md) notes before continuing this notes

## What is a Mecanum wheel?

<figure><img src="https://4192366100-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7rTy2orwOXMPfCAXCcez%2Fuploads%2FP3JrTZxuWXm6F1T9pEhu%2Fimage.png?alt=media&amp;token=f84dafcb-2324-41f6-9d4e-d09d2dfbda72" alt="" width="375"><figcaption></figcaption></figure>

Mecanum wheel is sometimes called the Swedish wheel or Ilon wheel. It is also an omnidirectional wheel design for a land-based vehicle to move in any direction. To understand how it works, here is an [interactive page](https://seamonsters-2605.github.io/archive/mecanum/).

## How does it work?

<figure><img src="https://4192366100-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7rTy2orwOXMPfCAXCcez%2Fuploads%2FM6FCnPnXmehezentf8kg%2Fimage.png?alt=media&amp;token=fb139c46-77be-42f0-9219-37267c740fec" alt="" width="338"><figcaption><p>Left: a 4 wheel omniwheel wheelbase. Right: a Mecanum wheelbase</p></figcaption></figure>

The small discs (called rollers) of a Mecanum wheel are 45 degrees to the turning direction. So, a vertically installed Mecanum wheel is equivalent to a 45-degree installed omniwheel. Therefore, the math for the two wheelbases above is the same.

<figure><img src="https://4192366100-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7rTy2orwOXMPfCAXCcez%2Fuploads%2FnP342smpfAewIu8E3Gx2%2Fimage.png?alt=media&amp;token=974eea61-bb5b-4ec3-8053-2c0e568b2f98" alt="" width="223"><figcaption><p>Blue: Wheel Drive Direction, Black: Movement Direction</p></figcaption></figure>

Although the wheel looks like it is moving in the blue arrows' direction, it is actually applying forces in the black arrows' direction.&#x20;

So, we can define the Forces A, B, C, and D in these directions like this. Then follow the steps in [this omniwheel notes](/hkust-robotics-team-software-tutorial/advanced-notes/omniwheel.md#simplest-case-wheelbase-moving-forward) to calculate how much forces we need to move the wheelbase forward.

<figure><img src="https://4192366100-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7rTy2orwOXMPfCAXCcez%2Fuploads%2FdwjjgzfFYQ9swFVKUsAK%2Fimage.png?alt=media&amp;token=dade2f55-2b6d-4e91-b38f-115c53602df9" alt="" width="226"><figcaption></figcaption></figure>

{% hint style="info" %}
Remember to check if your mech teammates installed the Mecanum wheels correctly like the picture below. Or else your wheelbase can't move and rotate correctly

&#x20;![](https://4192366100-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7rTy2orwOXMPfCAXCcez%2Fuploads%2F58Lg1YGncyYqXXhBnrk8%2Fimage.png?alt=media\&token=96a29a22-033e-4d0f-9fe4-eda2f59d52c9)
{% endhint %}

## Things to work on

Your team should have chosen a wheelbase for your RDC robot. Find out the general equation for your chosen wheelbase (i.e. speeds of all wheels in relation to Fx, Fy, and Torque) and write a control function (C code) to control your wheelbase.&#x20;

Given Fx = x, Fy = y, Torque = θ,

A = ? B = ? C = ? D = ?
