Tank Drive / Skid Steer (Part 1)
Standard Drive System
Resources
GM0's Overview of the Tank Drivetrain - Explains terminology, provides vizualizations, goes over the pros and cons. Must Read!
Coding a Tank Drive in Blocks - Good for explaining the logic behind an implementation
FTC Team 7477's Tank Drive Control Award Video - Showing that building a control system with a tank drive train is possible.
What is Tank?
A tank drive train is a method of driving that you would see outside of FTC robotics. For instance, one would control a tank drive train similarly to how an RC car is controlled, with one analog stick controlling the forward movement and the other controlling the turning of the robot.
A tank drive system consists of 4 powered normal wheels. It can go forward and back, as well as turn in place. Therefore, it has two main functions, drive and turn.
Advantages
Easy to build
Can get a tank drive train built quickly
Good for beginner programmers and builders
Can traverse over harsh terrain (ie the barrier from FTC game Freight Frenzy)
Drawbacks
Not as efficient as a mecanum drive train (no sideways movement)
Autonomous programs will not be as reliable
TeleOp Implementation
The drive system will have two variables that will decide the power set to each individual wheel, drive and turn. Drive will determine front and back motion, while turn will determine rotational motion. The drive variable should be set equally to each motor, since each motor needs to turn in the the same direction to go forward and backward. However, to turn in place, wheels on one side of the robot must move forward while the wheels on the other side move in reverse. This can be done by having a base drive power for all motors, and adding a turn power to one side while subtracting it from the other.
The following code will use the thought process described in the description above:
Initialize your motors like this:
Paste this into your opMode:
Why Reverse the Right Side?
When building a tank drive the motors on each side will be mirrored, meaning spinning all of them at a positive power will have each side spinning in opposite direction. First, you need to reverse one side of the drive train motors to have them all spinning in the same direction
Range.clip
You might've noticed something new here, the Range.clip function. In this example, this function sets a minimum of -1 for the power and 1 for the maximum power due to the fact that drive + turn, or drive - turn might be less than -1 or greater than 1 at times. Range.clip will limit the value at the given minimum and maximum so the motor's power bounds are not exceeded.
Autonomous Implementation
For more advanced teams using a tank drive system, we recommend using Roadrunner's tank configuration or making use of the pure pursuit algorithm for following more complex paths.
We will heavily rely on the imu and encoder readings to create an auto. There are two movements you can perform with a tank drive train with an autonomous program.
Turn to a specified angle.
Drive a specified amount of encoder ticks forward or backward.
Robot Class
OpMode
Case Studies
Take a look at one of the world's best FTC teams: Brainstormers! They made use of a six-wheel tank drive train during their time at worlds during the 2021 game Frieght Frenzy.
Our team also made use of a tank drive train. Here is our code base: https://github.com/MrinallU/Super7-Robotics-Tank
Last updated