RoboticsIntermediate

Field-Relative vs Robot-Relative Driving

The same joystick push means different things depending on whether commands are interpreted from the field or the robot.

FRCSwerveGyroCoordinates

Site connection

The robotics writing describes gyro-dependent swerve behavior and why orientation sensing matters.

Visual model

Command frame changes module vectors

A swerve command combines translation and rotation, but the frame of reference decides what forward means.

Interactive

Each module receives its own speed and wheel angle

Robot-Relative

Forward means the direction the robot is currently facing. If the robot turns, the same joystick input moves in a new field direction.

Field-Relative

Forward means the field's forward direction. The robot uses its gyro heading to rotate the driver command into robot coordinates.

Field-relative driving feels natural to drivers, but it depends on trustworthy heading estimation.

Common Pitfalls

  • Using the wrong coordinate convention in kinematics.
  • Not resetting gyro heading before a match.
  • Failing gracefully when the gyro disconnects.

Quick check

Quiz

What sensor is usually essential for field-relative driving?
  1. Gyro
  2. Break beam
  3. LED controller
  4. Bumper switch

The robot needs heading to rotate field commands into robot-relative commands.

Sources and Further Reading

Related Explainers