跳到主要内容

ArduPilot · configuration

TF-Luna 接入 ArduPilot I²C / CAN:接入与配置指南

TF-Luna 接入 ArduPilot 的准备、连接、配置与代码要点。原始文件可在资料下载区获取。涉及接口:I²C、CAN。

接口
I²C, CAN
整理日期
2026-08-31
资料说明
资料版本日期:2026-08-31。

适用范围

TF-Luna · ArduPilot · I²C、CAN

原始英文技术说明

Application of TF-Luna IIC in PixHawk (ArduPilot Firmware)

TF-Luna can be used with PixHawk for the purpose of obstacle avoidance.

1 TF-Luna Settings: The firmware version of TF-Luna should be at least V3.0.0 to support IIC connection to PixHawk. So please check the firmware version first. See detail commands in product manual. We take two TF-Luna as an example in this passage and set the address 0x10 and 0x11 separately.

2 PixHawk Connection: See the connection details in PixHawk manual and TF-Luna manual, we take example for connecting PixHawk flight controller:

Figure 1: Schematic Diagram of Connecting TF-Luna to I2C Interface of PixHawk Note:

1. Default cable sequence of TF-Luna and PixHawk are different, please change it

accordingly (SDA and SCL wires need to be interchanged). Look at the pinout of controller, pin configurations are starting from left to right:

2. IIC connector should be purchased by user.

3. If TF-Luna faces down, please take care the distance between lens and ground should be larger than TF-Luna’s blind zone (20cm). 4. If more TF-Luna need to be connected (10 LiDARs can be connected), the method is same. 5. Power source should meet the product manual demands:3.7V-5.2V, larger than 150mA*number of TF-Luna.

3        Parameters settings:
Common settings:
AVOID_ENABLE= 2 [if 3 = UseFence and UseProximitySensor doesn’t work in IIC then
choose 2 = UseProximitySensor]
AVOID_MARGIN=4
PRX_TYPE=4
Settings for first TF-Luna:
RNGFND1_ADDR=16 [Address of #1 TF-Luna in decimal]
RNGFND1_GNDCLEAR=15 [Unit: cm, depending upon mounting height of the module and
should be larger LiDAR than non-detection zone]
RNGFND1_MAX_CM=400 [It could be changed according to real demands but should be
smaller than effective measure range of LiDAR, unit is cm]
RNGFND1_MIN_CM=30 [It could be changed according to real demands and should be
larger than LiDAR non-detection zone, unit is cm]
RNGFND1_ORIENT=0 [#1 TF-Luna real orientation]
RNGFND1_TYPE = 25 [TF-Luna IIC same as TFmini-Plus IIC]
Settings for second TF-Luna:
RNGFND2_ADDR=17 [Address of #2 TF-Luna in decimal]
RNGFND2_GNDCLEAR=15
RNGFND2_MAX_CM=400
RNGFND2_MIN_CM=30
RNGFND2_ORIENT=25 [#2 TF-Luna real orientation]
RNGFND2_TYPE=25 [TF-Luna IIC same as TFmini-Plus IIC]
Upon setting of these parameters, click [Write Params] on the right of the software to finish.
If the error message “Bad LiDAR Health” appears, please check if the connection is correct
and the power supply is normal.

How to see the target distance from the LiDAR: press Ctrl+F button in keyboard, the following window will pop out:

Click button Proximity, the following window will appear:

The number in green color means the distance from LiDAR in obstacle avoidance mode(the number only refresh when this window opens, closes, zooms in or zooms out, it does not mean the real time distance from LiDAR and will not be influenced in Mission Planner version under v1.3.48, the problem could be solved by updating Mission Planner.

使用说明

按原始资料可读取的技术内容编排;具体的产品硬件版本、飞控/软件版本和现场安全边界仍应以原始资料及目标平台当前文档为准。

资料与下载

产品咨询

咨询产品方案

留下需求,我们会尽快与您联系。

产品咨询

提交成功

已收到您的询盘,我们会尽快与您联系。