MC Follow
This page covers MC Follow app setup and tuning
This document applies only to MC-Follow version 2.4.0 and newer.
Introduction
The MC Follow application uses external object tracking data to follow an object. The app needs to be paired with a source of Line-Of-Sight (LOS) and LOS rate, such as the Tracking Service app.
Setup
The system comes with pre-configured MC-Follow app and no additional setup is required. MC-Follow mode can be activated directly in the Modes tab in AMC, configured to an RC controller switch or assigned to a joystick button.
Tuning
1. Noise filter tuning
It is recommended to perform a noise filter tuning first. Refer to PX4 filter tuning guide and toIMU filters configuration for suggestions regarding IMU filters tuning for MC-Follow.
2. Angular rate and attitude controllers
Tune the PID angular rate and P attitude gains as defined in the multirotor tuning documentation. Make sure to disable MC_AIRMODE for the duration of the tuning, but make sure to re-enable it afterwards as it's necessary to fly highly dynamic trajectories.
3. Behavior at maximum speed
Verify that the drone is stable enough at the maximum desired velocity by performing the following tests:
Fast forward flight in altitude mode at constant altitude (reach desired approach flight speed).
Fast forward flight in altitude mode with decreasing altitude.
Test object (virtual object)
Testing can be performed without vision tracking using a so-called “Test Object”. The test object is defined by 3D coordinates relative to the local origin (i.e.: where the autopilot is initialized):
MCFLW_TO_ENU_X- Eastward position of the test object in meters.MCFLW_TO_ENU_Y- Northward position of the test object in meters.MCFLW_TO_ENU_Z- Upward position of the test object in meters.
Then MCFLW_TO_ENABLE must be set and the app restarted to enable the test object.
Note that a source of position (e.g.: GNSS) is required to use virtual following.
Restricted mode
There are two working modes of MC Follow app: restricted and unrestricted.
Restricted - where the pitch stick input on RC or Joystick control the velocity toward the tracked object.
Unrestricted - that requires a license and allows to specify pitch forward threshold (via
MCFLW_PF_THRSHLDparameter) above which the vehicle will continue the approach regardless of the pitch stick input. IfMCFLW_PF_THRSHLDis set to 0.0, the vehicle will start following the object right after the mode is engaged.
To abort the approach anytime, switch to any other flight mode (e.g. Stabilized mapped on a RC switch)
Active pitch limiter
The MC-Follow app allows to actively limit the vehicle pitch angle to keep the tracked object within camera vertical field of view. To use pitch limiter, camera parameters are required to be set:
MCFLW_CAM_VFOV- Camera sensor vertical FOV used to prevent the tracked object getting out of the view. Set to 0 to disable camera based pitch limiting.MCFLW_CAM_PITCH- Camera sensor pitch up angle used to actively limit pitch.
Active pitch angle limitation will restrict the pitch angle up to the value specified by MCFLW_PITCH_LIM.
Troubleshooting
The drone oscillates slowly in MC-Follow mode
If using video tracking pipeline, check if the camera orientation and calibration is set up correctly. Otherwise check the source of LOS.
The drone oscillates fast (>1 Hz) in MC-Follow mode
Reduce acceleration control proportional gain (MCFLW_ACC_P ) by 20% per step.
The drone vibrates while hovering (in any mode)
Verify that all the components are firmly attached to the drone.
Antennas must be rigid to have their resonance at high frequency.
Make sure no component touches the autopilot.
In case of a fixed structural resonance at low frequency, a notch filter can be enabled in APX4.
Adjust digital filters. Excessive filtering (e.g.: gyro LPF with low cutoff frequency or unnecessary notch filter) degrades the stability of the drone.
Adjust the angular rate and attitude gains. Remember that the rate D gain amplifies noise, so it cannot be set to a high value.
Last updated