MAVLINKHUD

Overview

The DOCK parameter group configures the Autonomous Docking behavior for ArduRover. This mode allows a rover to precisely approach and connect with a docking station (usually for charging).

Key Concepts

1. Approach Logic

The rover approaches a target (the dock) at a slow speed.

  • Direction: The rover expects to approach from a specific vector.
  • Correction: It uses heading correction to ensure it enters straight.

Parameter Breakdown

  • DOCK_SPEED: Approach speed (m/s). Needs to be slow enough to stop accurately but fast enough to maintain steering.
  • DOCK_DIR: The direction (heading) the dock faces.
  • DOCK_STOP_DIST: Distance from the target to cut motors.

Integration Guide

  • Target: The dock location is usually provided by a mission waypoint or a localized beacon.
  • Usage: Switch to DOCK mode when near the station.

Developer Notes

  • Library: Rover/mode_dock.cpp.

DOCK_DIR

deg
Default -1
Range 0 360

Docking Approach Direction (DOCK_DIR)

Description

DOCK_DIR specifies the "Entry Vector" for autonomous docking.

Many docking stations (like a boat ramp or a specialized charging garage) can only be entered from one specific direction. If the rover approached from the wrong side, it would hit a wall or miss the latch. This parameter defines the required compass heading for the final approach leg.

  • -1: Unset / No specific direction required.
  • 0-360: Compass heading (e.g. 90 = East).

Tuning & Behavior

  • Default: -1.
  • Usage: Align your docking station and use a compass to find the required approach heading. The drone will automatically maneuver to line itself up with this vector before starting the final approach.

DOCK_HDG_CORR_EN

Default 0
Range 0 1

Dock Heading Correction Enable (DOCK_HDG_CORR_EN)

Description

DOCK_HDG_CORR_EN is used for precision docking where the vehicle must enter the dock from a specific direction (e.g. into a narrow charging slot).

If disabled, the vehicle flies directly from its current position to the dock's location. If enabled, the vehicle will first navigate to a "Capture Point" and then follow a straight vector (the "Docking Lane") to ensure it arrives perfectly squared up to the target.

  • 1: Enabled. Vehicle attempts a straight-in head-on approach.
  • 0: Disabled. Vehicle flies direct-to-target.

Tuning & Behavior

  • Default: 0.
  • Requirement: Requires the dock to provide its own heading information via MAVLink or a beacon.

DOCK_HDG_CORR_WT

Default 0.75
Range 0 1.0

Dock Heading Correction Weight (DOCK_HDG_CORR_WT)

Description

DOCK_HDG_CORR_WT fine-tunes the geometry of the docking path.

DOCK_SPEED

m/s
Default 0
Range 0 100

Dock Mode Speed Limit (DOCK_SPEED)

Description

DOCK_SPEED sets the "Approach Velocity" for autonomous docking.

In Dock mode (used for Rovers and Boats), the vehicle navigates to a precise coordinate or a MAVLink beacon to dock for charging or recovery. Because this requires high precision and safety, this parameter caps the speed to ensure the vehicle doesn't "over-shoot" the dock or cause a collision.

Tuning & Behavior

  • Default: 0 (Uses the vehicle's standard cruise speed).
  • Recommendation: Set to a very low value (e.g. 0.5 m/s or 1.0 m/s) to ensure a safe and controlled approach.
  • Significance: Slower speeds allow the position control loops more time to react to external disturbances (like currents or uneven ground) as the drone enters the final docking phase.

DOCK_STOP_DIST

m
Default 0.3
Range 0 2.0

Docking Target Stop Distance (DOCK_STOP_DIST)

Description

DOCK_STOP_DIST defines the "Final Proximity" for a successful dock.

This parameter tells the autopilot exactly when to call the mission "Complete" and shut down the motors. Because real-world vehicles have momentum, this sets the point at which the braking logic triggers to ensure the vehicle stops exactly at the target.

Tuning & Behavior

  • Default: 0.3 meters (30 cm).
  • Calibration: If your rover consistently hits the docking station too hard, increase this value. If it stops too far away and fails to engage the charging pins, decrease it.
  • Accuracy: This requires a highly accurate position estimate (e.g. RTK GPS or a specialized docking beacon).