Setup Guide
Last updated
Was this helpful?
Last updated
Was this helpful?
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:
Enable optical flow fusion by setting EKF2_OF_CTRL.
To optionally disable GPS aiding, set EKF2_GPS_CTRL to 0
.
Enable UAVCAN_SUB_FLOW.
Enable UAVCAN_SUB_RNG.
Set EKF2_RNG_A_HMAX to 10
.
Set EKF2_RNG_QLTY_T to 0.2
.
Set UAVCAN_RNG_MIN to 0.08
(minimum range is 80mm)
Set UAVCAN_RNG_MAX to 30
(max range is 30m)
Set SENS_FLOW_MINHGT to 0.08
.
Set SENS_FLOW_MAXHGT to 30
.
Set SENS_FLOW_MAXR to 7.4
to match the PAW3902 maximum angular flow rate.
The parameters EKF2_OF_POS_X, EKF2_OF_POS_Y and EKF2_OF_POS_Z can be set to account for the offset of the Ark Flow from the vehicle centre of gravity.
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.
Refer to link below for the latest PX4 Optical Flow setup info
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.
Refer to link below for the latest Ardupilot Optical Flow setup info