At the recent Robocup Junior Western Australian State Championships competition, I took a few moments just before the awards ceremony to demonstrate a robot that could move in any direction.
While the actual robot was originally designed for the Rescue Maze challenge to allow it adjust its position in the maze by moving sideways, it ended up being much more capable in how it can move and could be the basis for a dancing robot for the Onstage Performance challenge. 😀
The robot was built using four drive motors with Mecanum wheels. Mecanum wheels are wheels made up of rollers set at 45 degrees.
By driving the wheels in different directions you can make the robot move in any direction. See the table below for some basic movements:
Robot Direction | Front Left | Front Right | Back Left | Back Right |
Move Forward | Forward | Forward | Forward | Forward |
Move Backward | Backward | Backward | Backward | Backward |
Spin Clockwise | Forward | Backward | Forward | Backward |
Spin Counter Clockwise | Backward | Forward | Backward | Forward |
Move Left | Backward | Forward | Forward | Backward |
Move Right | Forward | Backward | Backward | Forward |
Move Forward Left | None | Forward | Forward | None |
Move Forward Right | Forward | None | None | Forward |
Move Backward Left | Backward | None | None | Backward |
Move Backward Right | None | Backward | Backward | None |
To move in any direction you can use trigonometry (sine and cosine) to convert an angle into its X and Y directions and then feed those to the motors to drive the wheels. You can also add a spin speed to the motors to make the robot rotate at the same time as moving. You might need a check to ensure that the total speed for any motor does not exceed the maximum speed the motor is capable of. You can even use a gyro sensor to ensure that your robot is facing in the correct direction.
There is plenty of information and instructional videos available online that explain how Mecanum wheels work, who created them and how to program a robot to use them.
These are the Mecanum wheels sets I have used with my Lego robots:
- Plastic: Mecanum Wheels – 65mm, LEGO® Compatible (4 Pack) (preferred)
- Metal: Mecanum Wheels 4 pieces (compatible with LEGO blocks)
Watch the following video to see what the Mecanum wheels can do:
MazeBot: Lego Mecanum Wheel Test Program written in EV3 Basic (Direct Link)
Another alternative is the Holonomic/Killough Platform based on three standard Omni wheels set at 120 degrees from each other. You can also use a 4 omni wheel layout with the wheels mounted at 45 degrees on each corner.
You can use similar trigonometry to calculate the motor speeds to control the robot. This does not look as fancy as Mecanum wheels, but can achieve a similar effect with one less motor and with standard Omni wheels.
- From MTA: Dual 50mm Rotacaster – 35A – LEGO Hub – Each
- From Rotacaster: 50mm Omni Wheel with LEGO(TM) or VEX(TM) style acetal axle insert
Here is a demo video of a test robot using Omni wheels:
KilloughBot: Holonomic Killough Platform – Patterns (Direct Link)
For more information on robotics, check out the following link:
I hope you find inspiration from this article.
David
06-Feb-2023: Mention 4 omni wheel holonomic platform approach.
This article was originally posted on http://www.winthropdc.com/blog.
One thought on “#Robotics Making a Robot that can move in any direction”