Setup Guide
Last updated
Last updated
© 2024 Holybro. All rights reserved.
The recommended mounting orientation is with the connectors on the board pointing toward the back of the vehicle, as shown in the following picture.
This corresponds to the default value (0) of the parameter SENS_FLOW_ROT. Change the parameter appropriately if using a different orientation. The sensor can be mounted anywhere on the frame, but you will need to specify the focal point position, relative to the vehicle's center of gravity, during PX4 configuration.
On the H-Flow, the CAN bus termination resistor is turned on by default. You can turn it off by configuring the following parameters:
Parameter
Description
CAN built-in bus termination.
Connect H-FLOW to CAN port
Set the following parameters:
UAVCAN_ENABLE = Sensors Automatic Config
SENS_EN_PAA3905 = Enabled
EKF2_OF_CTRL = Enabled
EKF2_GPS_CTRL = 0 (disable GPS assist)
EKF2_RNG_A_HMAX = 10
EKF2_RNG_QLTY_T = 0.2
UAVCAN_SUB_FLOW = Enabled
UAVCAN_SUB_RNG = Enabled
UAVCAN_RNG_MIN = 0.08 (minimum range is 80mm)
UAVCAN_RNG_MAX = 30 (max range is 30m)
EKF2_OF_POS_X, EKF2_OF_POS_Y, EKF2_OF_POS_Z (H-FLOW EKF offsets based on its mounting position)
Reboot
After connecting the sensor to the autopilot, connect it to the autopilot using QGroundControl. Open the MAVLink Inspector screen for DISTANCE_SENSOR. If the sensor is OK, you can see that the current_distance number is non-zero.
Connect H-FLOW to CAN port
Set the following parameters:
FLOW_TYPE = 6 (DroneCAN)
CAN_P1_DRIVER = 1
CAN_D1_PROTOCOL = 1
RNGFND1_TYPE = 24
RNGFND1_MAX_CM = 3000 (max range 30m)
EK3_SRC_OPTIONS = 0 (disable FuseALLVelocities)
EK3_FLOW_DELAY (default)
EK3_SRC1_POSXY = 0 (use optical flow)
EK3_SRC1_VELXY = 5
EK3_SRC1_POSZ = 1
EK3_SRC1_VELZ = 0
EK3_SRC1_YAW = 1
FLOW_POS_X, FLOW_POS_Y, FLOW_POS_Z (H-FLOW position offsets based on its mounting position)
Reboot
After connecting the sensor to the autopilot, connect to the autopilot using Mission Planner and open the Status tab of the Flight Data screen. If the sensor is operational, you should see non-zero opt_m_x, opt_m_y, and opt_qua values.