MAVLINKHUD

Overview

The OFS parameter group (specifically OFS_TYPE or FOLL_OFS_TYPE) configures the coordinate frame for Follow Mode.

Key Concepts

1. Frame Selection

  • 0 (North-East-Down): The offset from the leader is fixed to the world. If you set -10m X, the drone stays 10m South of the leader, regardless of which way the leader is facing.
  • 1 (Relative to Heading): The offset is fixed to the leader's nose. If you set -10m X, the drone stays 10m behind the leader's tail. If the leader turns, the drone orbits around to stay behind it.

Developer Notes

  • Library: libraries/AP_Follow.
  • See Also: FOLL for main follow configuration.

OFS_TYPE: Follow offset type

Description

Follow offset type.

Values

Value Meaning
0 North-East-Down (NED)
1 Relative to lead vehicle heading
  • Default: 0 (NED)

Description

This parameter defines how the Follow Mode interprets the offset vector (X, Y, Z).

  • 0 (NED): The offsets are fixed to the compass. If X=10, the drone stays 10 meters North of the target, regardless of which way the target is facing.
  • 1 (Relative): The offsets rotate with the target. If X=10, the drone stays 10 meters in front of the target. If Y=10, it stays 10 meters to the right. This is usually the preferred mode for "Follow Me".

Source Code

ardupilot/libraries/AP_Follow/AP_Follow.cpp