MAVLINKHUD

Overview

The WRC parameter group configures the Closed-Loop Wheel Speed controller for ArduRover.

Without WRC, a rover uses "Open-Loop" control, sending a fixed throttle percentage. With WRC, the autopilot uses feedback from Wheel Encoders to ensure the wheels are spinning at exactly the commanded speed, regardless of surface friction, slope, or battery voltage.

Key Concepts

1. Velocity Feedback

The system calculates the error between the "Commanded Wheel Speed" and the "Actual Wheel Speed" (measured by encoders).

  • WRC_ENABLE: Master switch.

2. PID Tuning

(If present in group) Standard gains to control the responsiveness of the wheel motor response.

Integration Guide

  1. Hardware: Install and calibrate wheel encoders (WENC group).
  2. Enable: Set WRC_ENABLE = 1.
  3. Tuning: Adjust gains to ensure the rover can maintain a crawl up a hill without stalling or jerking.

Developer Notes

  • Library: libraries/AP_WheelEncoder/AP_WheelRateControl.cpp.
  • Dependency: This group is functionally useless without the WENC group being configured first.

WRC_ENABLE

Default 0
Range 0 1

Wheel Rate Control Enable (WRC_ENABLE)

Description

WRC_ENABLE activates the closed-loop speed controller for a Rover's wheels.

Standard Rovers often use "Open-Loop" control – if you command 50% throttle, the autopilot sends 1500 PWM to the ESC. With Wheel Rate Control, the autopilot uses sensors (Wheel Encoders) to measure exactly how fast the wheels are turning and adjusts the throttle in real-time to maintain the requested speed, even when driving over uneven terrain or up hills.

Tuning & Behavior

  • Default: 0 (Disabled).
  • Requirement: Requires functional wheel encoders (WENC_TYPE).
  • Benefit: Dramatically improves speed consistency and navigation accuracy for ground vehicles.

WRC_RATE_MAX

rad/s
Default 0
Range 0 100

Wheel Rate Maximum (WRC_RATE_MAX)

Description

WRC_RATE_MAX sets the physical speed limit for your wheels in the rate controller.